28
votes

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?

3

3 Answers

54
votes

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://[email protected]/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.

3
votes

I wanted to add that SourceTree somehow wants it without the username:

https://bitbucket.org/username/repository.git
-1
votes

Have you tried using?

[email protected]:accountname/reponame.git

You may take a look here