Using ssh over https for bitbucket.org

Recently i tried to access my bitbucket repository from inside a corporate network which blocks all traffic on port 22. After several unsuccessful trials to simply use https, I looked for another possibility. The solution was quite simple: ssh over https

The default clone command of a repository will be something like:

git clone git@bitbucket.org:${YOURUSER}/${YOURPROJECT}.git

Thanks to this site: CraigTP’s Blog i found out that bitbucket provides access to ssh over port 443 with an alternative url: altssh.bitbucket.org

In order to get access using ssh, I did this:

  1. Added my company account/email as a user to the according repository(becasue we also use git within the company)
  2. Registered with this mail and put my public ssh key to bitbucket
  3. Modified the .ssh/config as shown below
# Added content for ~/.ssh/config
Host bitbucket.org
   Hostname altssh.bitbucket.org
   Port 443

This finally gave me access 🙂

 

 

 

 

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.