致命的:无法从存储库中读取

时间:2014-11-11 02:12:13

标签: git bash bitbucket

因此,在我之前的一台笔记本电脑死亡之后,我得到了一台新笔记本电脑 - 我现在正试图推送到Bitbucket上的存储库,并遇到了大量错误。关于在Bitbucket上设置SSH的所有指南似乎都与Git Bash打交道 - 我正在运行Git Shell,其中一些命令会返回很多错误。这是我一直看到的一些错误,不知道该怎么做:

C:\Users\Tai\Desktop\SYCS136 [master]> git push origin master
Warning: Permanently added 'bitbucket.org,131.103.20.167' (RSA) to the list of known hosts.
Permission denied (publickey).
fatal: Could not read from remote repository.

C:\Users\Tai\Desktop\SYCS136 [master]> ssh -T hg@bitbucket.org
Warning: Permanently added 'bitbucket.org,131.103.20.167' (RSA) to the list of known hosts.
Permission denied (publickey).


C:\Users\Tai\Desktop\SYCS136 [master]> ssh -v hg@bitbucket.org
OpenSSH_6.6.1, OpenSSL 1.0.1i 6 Aug 2014
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 1: Applying options for *
debug1: Connecting to bitbucket.org [131.103.20.167] port 22.
debug1: Connection established.
debug1: identity file /c/Users/Tai/.ssh/id_rsa type 1
debug1: identity file /c/Users/Tai/.ssh/id_rsa-cert type -1
debug1: identity file /c/Users/Tai/.ssh/id_dsa type -1
debug1: identity file /c/Users/Tai/.ssh/id_dsa-cert type -1
debug1: identity file /c/Users/Tai/.ssh/id_ecdsa type -1
debug1: identity file /c/Users/Tai/.ssh/id_ecdsa-cert type -1
debug1: identity file /c/Users/Tai/.ssh/id_ed25519 type -1
debug1: identity file /c/Users/Tai/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.6.1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3
debug1: match: OpenSSH_5.3 pat OpenSSH_5* compat 0x0c000000
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<3072<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Server host key: RSA 97:8c:1b:f2:6f:14:6b:5c:3b:ec:aa:46:46:74:7c:40
Warning: Permanently added 'bitbucket.org,131.103.20.167' (RSA) to the list of k
nown hosts.
debug1: ssh_rsa_verify: signature correct
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/Tai/.ssh/id_rsa
debug1: Authentications that can continue: publickey
debug1: Trying private key: /c/Users/Tai/.ssh/id_dsa
debug1: Trying private key: /c/Users/Tai/.ssh/id_ecdsa
debug1: Trying private key: /c/Users/Tai/.ssh/id_ed25519
debug1: No more authentication methods to try.
Permission denied (publickey).

C:\Users\Tai\Desktop\SYCS136 [master]> ps -e | grep [s]sh-agent
Get-Process : Parameter cannot be processed because the parameter name 'e' is ambiguous. Possible matches include: -ErrorAction -ErrorVariable.
At line:1 char:3
+ ps <<<<  -e | grep [s]sh-agent
    + CategoryInfo          : InvalidArgument: (:) [Get-Process], ParameterBindingException
    + FullyQualifiedErrorId : AmbiguousParameter,Microsoft.PowerShell.Commands.GetProcessCommand

我可以看一下另一个指南来解决这个问题,还是有些东西我不知道?

1 个答案:

答案 0 :(得分:0)

听起来你丢失了旧机器上的SSH密钥(你应该在下次将它们备份到安全的地方)。您的新机器已经有SSH密钥对,它与旧密码对不同,因此您需要在BitBucket上更新授权密钥。