It just means Git doesn't find the public/private key in %HOME%/.ssh
.
Which in turn means the shhd (ssh daemon on the server) doesn't find a matching public key in the server ~git/.ssh/authorized_keys
.
You can make sure to use an https url for instance (which is what the OP is intended to use):
cd c:\path\to\my\repo
git remote set-url origin https://bitbucket.org/<owner>/<repo>
Regarding known_hosts
, a simple ssh -T git@bitbucket.org
will fix that:
$ ssh -T git@bitbucket.org
The authenticity of host 'bitbucket.org (131.103.20.168)' can't be established.
RSA key fingerprint is 97:8c:1b:f2:6f:14:6b:5c:3b:ec:aa:46:46:74:7c:40.
Are you sure you want to continue connecting (yes/no)?
Add 'yes' and bitbucket.org would be added to the ~/.ssh/known_hosts
.
Yet, in the absence of a registered public key, the result would still be the same.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'bitbucket.org,131.103.20.168' (RSA) to the list of known hosts.
Permission denied (publickey).
The bash on Git for Windows is not weird:
the git bash in msysgit/Git for windows 1.9.5 is an old one:
GNU bash, version 3.1.20(4)-release (i686-pc-msys)
Copyright (C) 2005 Free Software Foundation, Inc
But with the phasing out of msysgit (Q4 2015) and the new Git For Windows (Q2 2015), you now have Git for Windows 2.4.4.
It has a much more recent bash, based on the 64bits msys2 project, an independent rewrite of MSYS, based on modern Cygwin (POSIX compatibility layer) and MinGW-w64 with the aim of better interoperability with native Windows software. msys2 comes with its own installer too.
The git bash is now (with the new Git For Windows):
GNU bash, version 4.3.33(3)-release (x86_64-pc-msys)
Copyright (C) 2013 Free Software Foundation, Inc.