I've set up a local git repository on my computer, and I'm trying to push that to a newly created Bitbucket account.
The problem is that Bitbucket gives me an ssh
url to push to, but the network I'm on (university) has the ssh port blocked for external ssh. So that fails, and if I try to replace ssh://
with https://
it keeps telling me that authentication has failed.
Is there a way to push to bitbucket without using ssh
?
You can connect to GitHub and Bitbucket repositories via HTTPS. Both will also let you push.
These are the typical URLs for HTTPS access:
https://username@bitbucket.org/username/repository.git
https://github.com/username/repository.git
Note that Git will prompt you for your password whenever you want to communicate with the remote.
I wanted to add that SourceTree somehow wants it without the username:
https://bitbucket.org/username/repository.git
Https addresses on GitHub are read-only. As far as I know, SSH is your only option if you need write access. See poke's answer.
Btw your slashes are wrong, it's ssh://
and https://
Have you tried using?
git@bitbucket.org:accountname/reponame.git
You may take a look here