arc90/git-sweep

Warn the user if git-sweep notices that a repo's endpoint is an HTTP URL instead of a git URL

Opened this issue · 9 comments

My repo was created using GitHub for Mac using the default settings. When I git sweep cleanup, it prompts me to authenticate every time it deletes a branch.

This is because you cloned the repo over https instead of git, so it cant use your git credentials to do the sweep, prompting you to enter your credentials with every git push origin :branchname, or any action it's calling on behalf of you. git-sweep could potentially store that information, but that seems like it's out of scope. I'd recommend setting up your ssh keys and then replacing your origin with the proper ssh endpoint:

git remote rm origin
git remote add origin git@github.com:someuser/somerepo

This makes sense to me. Let me try properly setting up the remote with a sample repository and ensure that GitHub for Mac still functions.

I wonder if the Mac client silently leads you to use the https address. If that were the case, it might be worth adding a provision for this.

I wonder if the Mac client silently leads you to use the https address.

I'm pretty sure it does, I just used the default settings.

You can manually edit your .git/config for the repo on your local machine to switch it back to the git:// URL

I think a warning if git-sweep notices the remote is not a git endpoint would be enough. Everything else seems out of scope for such a specific tool

You can manually edit your .git/config for the repo on your local machine to switch it back to the git:// URL

This probably works. I used the Settings pane in the Mac app and updated it to the git:// URL and everything works fine.

I think a warning if git-sweep notices the remote is not a git endpoint would be enough.

+1, going to rename this issue.

A warning is a good idea, at least you then wouldn't get trapped in a terrible "Enter your password" loop.

Adding this to the next milestone.

Gut push origin