Setting up a BitBucket git repo with A2 Hosting


Recently, I moved this website to A2 Hosting. Since I am using git at the office intensely for developing the company’s website, i felt like I’d have to continue using git for my home-story blog, too.

This is a translation of my German blog post Ein Git-Repository auf BitBucket mit A2 Hosting einrichten. To read its German original, follow the link to the second pag eof this article.

When I was a little more new to git, I chose Bitbucket as the service to host my repo. There I can have unlimited private repos with up to four more users and “sync” all changes on any device back and forth. So I wanted to set up git on my new hosting provider.

Getting command-line-acces and setting up SSH was very easy with A2’s cPanel. Since I – somehow – already managed to setup SSH via command line, this was a charm. But, connecting to BitBucket actually was not that easy. For security reasons, A2 Hosting is using another port für SSH-connections 7822 instead of the standard Port 22. So all efforts to establish a connection fail.

I asked the support team and they answered within 12 hours – despite (or because?) the time shift between Germany and the US. They actually did not provide a proper solution, but they gave me an essential hint.

To use a git repository from Bitbucket on A2-hosted machines, you have to use the following remote-URL-structure:


You can do this either by using the command line

git remote add origin ssh://{username}/{repository}.git

or you could change the .git/config-file in your repository’s folder and change the url-path in the [remote "origin"] section via FTP or whatever.

Like this post? Share it!

3 thoughts on “Setting up a BitBucket git repo with A2 Hosting

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>