Search code examples
gitbitbucket

Git and Bitbucket without SSH


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?


Solution

  • 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.