Git 不理解ssh转发业务
所以我遵循了,或者认为我遵循了:并且遇到了一些问题 当我这样做时:Git 不理解ssh转发业务,git,github,ssh,Git,Github,Ssh,所以我遵循了,或者认为我遵循了:并且遇到了一些问题 当我这样做时:ssh-v mysiteName.com 我得到了它要求我的问题: Adam@mysiteName.com's password: debug1: Authentications that can continue: publickey,password debug1: No more authentication methods to try. Permission denied (publickey,password).
ssh-v mysiteName.com
我得到了它要求我的问题:
Adam@mysiteName.com's password:
debug1: Authentications that can continue: publickey,password
debug1: No more authentication methods to try.
Permission denied (publickey,password).
我的服务器上没有名为Adam的用户,该服务器仅由我和我管理。我不知道为什么它使用我的mac的用户名并试图用它访问我的网站。它应该是UserName@mysiteName.com的
,而不是Adam(obvi用户名是真实用户名的掩码)
我进入~/.ssh/config
看到:
Host mySiteName.com
ForwardAgent yes
在/etc/ssh\u config
中,我看到:
Host *
SendEnv LANG LC_*
ForwardAgent yes
所以这一部分都很好,当我执行ssh-agent-L
时,我看到了我的密钥。所以我可以假设这部分是好的
在我的服务器上,我执行以下操作:
echo "$SSH_AUTH_SOCK"
/tmp/ssh-1RgQijAj2U/agent.14798
这部分有效,最后一部分无效:
git clone my_github_repo
Cloning into 'Git-Repo-Name'...
Warning: Permanently added the RSA host key for IP address 'xxx.xx.xxx.xxx' to the list of known hosts.
Permission denied (publickey).
fatal: Could not read from remote repository.
因此,我的问题如下:
- 这是怎么回事Adam@siteName.com谁的密码?应该是UserName@siteNames.com
- ssh代理转发失败的原因是什么?我的mac正在将此密钥转发到此服务器,密钥在那里,为什么无法克隆回购?
ssh
默认使用当前用户名。如果要使用另一个,请使用-l
(ssh-l user mysiteName.com
)选项或url(ssh>)将其指定为ssh
user@mysiteName.com
)。如果您在使用ssh密钥时仍然存在问题,请回来给我们一些来自服务器和客户端的日志信息