在不同的PC上拒绝Git访问?

时间:2014-09-30 07:15:10

标签: git ssh gitlab

所以我下载了git for windows并创建了一个密钥:

ssh-keygen -t rsa -C "my@email.com"

将生成的密钥粘贴到gitlab上的c:\users\myname\.ssh我的项目/存储库中。但我似乎无法访问我的存储库。当我想推动时,我首先得到Permanently added warning to the list of unknown hosts。然后access deniedcould not read from remote repository

我几天前第一次在家里设置我的帐户,我似乎无法弄清楚我做的不同。警告到底意味着什么?它甚至在我的新系统上找到了SSH密钥吗?我尝试多次创建/附加密钥,即使没有密码短语。

我已多次浏览这些文档但没有结果:https://help.github.com/articles/error-permission-denied-publickey

C:\xampp\htdocs\projects\ecosense [master]> ssh -vT madmenyo@github.com
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: /etc/ssh/ssh_config line 5: Applying options for github.com
debug1: Connecting to github.com [192.30.252.130] port 22.
debug1: Connection established.
debug1: identity file /c/Users/mgw/.ssh/github_rsa type 1
debug1: identity file /c/Users/mgw/.ssh/github_rsa-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 libssh-0.6.0
debug1: no match: libssh-0.6.0
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-sha1 none
debug1: kex: client->server aes128-ctr hmac-sha1 none
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: RSA 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48
Warning: Permanently added 'github.com,192.30.252.130' (RSA) to the list of know
n 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\\mgw\\.ssh\\github_rsa
debug1: Authentications that can continue: publickey
debug1: Offering RSA public key: /c/Users/mgw/.ssh/id_rsa
debug1: Authentications that can continue: publickey
debug1: Offering RSA public key: /c/Users/mgw/.ssh/github_rsa
debug1: Authentications that can continue: publickey
debug1: No more authentication methods to try.
Permission denied (publickey).

这可能是相关的,因为它与故障排除文档不同。我这里有两个地址:

C:\xampp\htdocs\projects\ecosense [master]> ssh-add -l
2048 90:1b:b7:a4:22:29:82:a9:c1:17:37:b6:19:e9:d9:a2 C:\Users\mgw\.ssh\github_rs
a (RSA)
2048 8e:59:95:d2:33:3f:08:c2:56:66:79:4b:00:2d:31:42 /c/Users/mgw/.ssh/id_rsa (R
SA)

0 个答案:

没有答案