How to connect in VS2015 to a remote private repository on Bitbucket-e?
I install in Team Explorer> Settings> Git> Repository Settings> Remotes> Add parameters:
Fetch: https://bitbucket.org/ {team_id} / {storage_name}
Push: https://bitbucket.org/ {team_id} / {storage_name}
When I try to push and query User / Pwd to the site: the bitbucket.org error occurs: "Error encountered while pushing the remote repository: Response status code does not indicate success: 401 (Unauthorized)."
PS Also installed SSH key on bitbucket.org.
They also write that VS2015 does not work via SSH, so the need to configure it is questionable.
SSH Config:
Host bitbucket.org IdentityFile ~/.ssh/id_rsa
Stack trace over SSH connection:
>ssh -Tv git@bitbucket.org ... debug1: Host 'bitbucket.org' is known and matches the RSA host key. debug1: Found key in /cygdrive/c/Users/xxx/.ssh/known_hosts:1 debug1: ssh_rsa_verify: signature correct debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS received debug1: SSH2_MSG_SERVICE_REQUEST sent debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: publickey debug1: Next authentication method: publickey debug1: Trying private key: /cygdrive/c/Users/xxx/.ssh/identity debug1: Offering public key: /cygdrive/c/Users/xxx/.ssh/id_rsa debug1: Remote: Forced command: conq username: *bitbucket_user_login* debug1: Remote: Port forwarding disabled. debug1: Remote: X11 forwarding disabled. debug1: Remote: Agent forwarding disabled. debug1: Remote: Pty allocation disabled. debug1: Server accepts key: pkalg ssh-rsa blen 149 Enter passphrase for key '/cygdrive/c/Users/xxx/.ssh/id_rsa': Enter passphrase for key '/cygdrive/c/Users/xxx/.ssh/id_rsa': Enter passphrase for key '/cygdrive/c/Users/xxx/.ssh/id_rsa': debug1: Trying private key: /cygdrive/c/Users/xxx/.ssh/id_dsa debug1: No more authentication methods to try. Permission denied (publickey).
Another problem with ssh-agent (ohm):
>ssh-agent -s SSH_AUTH_SOCK=/tmp/ssh-djump24624/agent.24624; export SSH_AUTH_SOCK; SSH_AGENT_PID=28000; export SSH_AGENT_PID; echo Agent pid 28000; >ssh-add ~/.ssh/id_rsa Could not open a connection to your authentication agent.
View from Git-Bash (with Git-Bash, the problem is solved via Run as administrator):
xxx@LocalPC MINGW64 ~ $ cd ~/.ssh/ xxx@LocalPC MINGW64 ~/.ssh $ dir config id_rsa id_rsa.pub known_hosts xxx@LocalPC MINGW64 ~/.ssh $ ssh -Tv git@bitbucket.org OpenSSH_7.1p1, OpenSSL 1.0.2d 9 Jul 2015 debug1: Reading configuration data /c/Users/xxx/.ssh/config debug1: /c/Users/xxx/.ssh/config line 1: Applying options for bitbucket.org debug1: Reading configuration data /etc/ssh/ssh_config debug1: Connecting to bitbucket.org [131.103.20.167] port 22. debug1: Connection established. debug1: identity file /c/Users/xxx/.ssh/id_rsa type 1 debug1: key_load_public: No such file or directory debug1: identity file /c/Users/xxx/.ssh/id_rsa-cert type -1 debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_7.1 debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3 debug1: match: OpenSSH_5.3 pat OpenSSH_5* compat 0x0c000000 debug1: Authenticating to bitbucket.org:22 as 'git' debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: server->client aes128-ctr umac-64@openssh.com none debug1: kex: client->server aes128-ctr umac-64@openssh.com none debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<3072<8192) sent debug1: got SSH2_MSG_KEX_DH_GEX_GROUP debug1: SSH2_MSG_KEX_DH_GEX_INIT sent debug1: got SSH2_MSG_KEX_DH_GEX_REPLY debug1: Server host key: ssh-rsa SHA256: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx debug1: Host 'bitbucket.org' is known and matches the RSA host key. debug1: Found key in /c/Users/xxx/.ssh/known_hosts:1 debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS received debug1: Roaming not allowed by server debug1: SSH2_MSG_SERVICE_REQUEST sent debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: publickey debug1: Next authentication method: publickey debug1: Offering RSA public key: /c/Users/xxx/.ssh/id_rsa debug1: Remote: Forced command: conq username:*bitbucket_user_login* debug1: Remote: Port forwarding disabled. debug1: Remote: X11 forwarding disabled. debug1: Remote: Agent forwarding disabled. debug1: Remote: Pty allocation disabled. debug1: Server accepts key: pkalg ssh-rsa blen 149 Load key "/c/Users/xxx/.ssh/id_rsa": Permission denied debug1: No more authentication methods to try. Permission denied (publickey).