The repository has so far been based on svn located on a webserver. About time to so something about that, moving it to Git and moving it to the cloud.

In Git bash check the git version

$ git --version
git version


git svn clone svn+ssh://assess@assessmentee/var/svn/ C:/xampp/htdocs/

will create a new git repo.

The repository will be hosted at

The public/private rsa key pair is created with


in the /c/Users/me/.ssh folder. The public key is stored in the bitbucket SSH key store.

The path of the private key is stored in the .ssh config file

 identityFile ~/.ssh/bitbucket/id_rsa

Mind the indentation in the second line

Then in the repo folder point git to the new remote url:

cd /c/xampp/htdocs/
git remote add origin ssh://


Check the configuration:

$ git config --list

If an initial commit is made at the remote repository and initial “git pull” is required. There may be a mismatch in the users in the original repo and the new one, therefore the command to use is

git pull --allow-unrelated-histories

Git bash sanity checks:

$ ssh -T
logged in as rickit.
You can use git or hg to connect to Bitbucket. Shell access is disabled.

The disabled shell access line is a red herring

There is also the long -v (verbose) version:

ssh -Tv

OpenSSH_7.3p1, OpenSSL 1.0.2k  26 Jan 2017

debug1: Reading configuration data /c/Users/me/.ssh/config

debug1: Offering RSA public key: /c/Users/me/.ssh/bitbucket/id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 279
debug1: Authentication succeeded (publickey).

List the private keys:

 ssh-add -l
2048 SHA256:iIv26JzZezl1IiVGBisChemklH8VijF8+2Ij0me3Fx2E /c/Users/me/.ssh/id_rsa (RSA)

Add a private key

$ ssh-add ~/.ssh/bitbucket/id_rsa
Identity added: /c/Users/me/.ssh/bitbucket/id_rsa (/c/Users/me/.ssh/bitbucket/id_rsa)

Check if there is an ssh-agent:

ps -e  | grep [s]sh-agent
    15768       1   15768      15768  ?         197608 16:59:01 /usr/bin/ssh-agent

At this point there may be an error:

No supported authentication methods available (server sent: publickey)

Problem is that Git Bash depends on openSSH for SSH operations so define it explicitly

$ which ssh

And add to the .bashrc file the line

export GIT_SSH=/bin/ssh.exe

Having done all that, the repository can be pushed

git push origin master

Be aware that if you want to use TortoiseGit next you run into problems. This tool does not use openSSH for SSH operations but  Putty / Pageant. Nothing wrong with that but Pageant does not understand private keys (the id_rsa) based on openSSH. Solution: open the private key in another tool called PuttyGen (import key) and save as a regular private key. Use this key in the TortoiseGit settings.

And what to do in the event of having two bitbucket accounts?

First add lines to the .ssh/config file:

 identityFile ~/.ssh/bitbucket/id_rsa
Host bitbucket-2
  PreferredAuthentications publickey
  IdentityFile ~/.ssh/bitbucket-2/id_rsa

then use

git push ssh://git@bitbucket-2/Dogiopatents/document-center.git