hub
hub copied to clipboard
`remote add` should set usable pushurl
The problem I'm trying to solve:
$ cd my-github-repository
$ hub remote add <someusername>
$ git push <someusername>
fatal: remote error:
You can't push to git://github.com/<someusername>/repo.git
Use https://github.com/<someusername>/repo.git
$ tail -n3 .git/config
[remote "someusername"]
url = git://github.com/<someusername>/repo.git
fetch = +refs/heads/*:refs/remotes/someusername/*
How I imagine hub could expose this functionality:
hub
could simply add the ssh pushurl entry as well. This is what I do by hand for quite a while every now and then:
$ tail -n4 .git/config
[remote "someusername"]
url = git://github.com/<someusername>/repo.git
url = [email protected]:<someusername>/repo.git
fetch = +refs/heads/*:refs/remotes/someusername/*