Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/github/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在服务器上使用git-修复conq用户名_Git_Github_Ssh - Fatal编程技术网

如何在服务器上使用git-修复conq用户名

如何在服务器上使用git-修复conq用户名,git,github,ssh,Git,Github,Ssh,我最近改变了我的托管公司,因为我有了一个新的用户名 尼克韦布 我有一个使用此用户名的bitbucket帐户 尼基莫拉 在新的托管公司,我已经建立了: ssh 公钥 使用此命令使git随处可用:alias git=“/usr/local/cpanel/3rdparty/bin/git” 现在,当我尝试克隆存储库时,它会说 拒绝访问(公钥) 如果我运行ssh-vhg@bitbucket.org这是完整的日志: OpenSSH_6.1p1, OpenSSL 1.0.0-fips 29 Mar 20

我最近改变了我的托管公司,因为我有了一个新的用户名

尼克韦布

我有一个使用此用户名的bitbucket帐户

尼基莫拉

在新的托管公司,我已经建立了:

  • ssh
  • 公钥
  • 使用此命令使git随处可用:
    alias git=“/usr/local/cpanel/3rdparty/bin/git”
现在,当我尝试克隆存储库时,它会说

拒绝访问(公钥)

如果我运行
ssh-vhg@bitbucket.org
这是完整的日志:

OpenSSH_6.1p1, OpenSSL 1.0.0-fips 29 Mar 2010
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 50: Applying options for *
debug1: Connecting to bitbucket.org [131.103.20.167] port 22.
debug1: Connection established.
debug1: identity file /home/nickwebd/.ssh/id_rsa type 1
debug1: identity file /home/nickwebd/.ssh/id_rsa-cert type -1
debug1: identity file /home/nickwebd/.ssh/id_dsa type -1
debug1: identity file /home/nickwebd/.ssh/id_dsa-cert type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3
debug1: match: OpenSSH_5.3 pat OpenSSH_5*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.1
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<1024<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
debug1: Host 'bitbucket.org' is known and matches the RSA host key.
debug1: Found key in /home/nickwebd/.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: 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: /home/nickwebd/.ssh/id_rsa
debug1: Remote: Forced command: conq username:nickimola
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 279
debug1: Trying private key: /home/nickwebd/.ssh/id_dsa
debug1: No more authentication methods to try.
Permission denied (publickey).
nickwebd@cloud05 [~]# debug2: client_check_window_change: changed
debug2: channel 0: request window-change confirm 0
debug2: client_check_window_change: changed
debug2: channel 0: request window-change confirm 0
它要求我输入密码短语,但当我尝试粘贴(甚至写入)时,它会返回以下内容:

debug3:收到SSH2\u消息\u忽略

显然,我无法正确添加密码短语。

此处列出的“conq用户名”是与您正在使用的SSH密钥关联的Bitbucket帐户。Bitbucket已经将SSH密钥识别为您的Bitbucket帐户(nickimola)上的密钥,因此您的连接基本上是成功的。您的托管提供商的支持团队在这里没有太大帮助,因为托管提供商帐户名与您的Bitbucket帐户名没有任何连接

此外,ssh代理需要添加私钥,而不是公钥。你需要的命令是

ssh-add ~/.ssh/id_rsa
添加私钥后,请尝试“ssh-v”hg@bitbucket.org”“又来了。(顺便说一句,该命令仅适用于调试,其结果与使用“git”而不是“hg”的结果相同。)如果您将“nickwebd”帐户的公钥与您的Bitbucket用户名关联,那么您应该在托管提供商的系统和您自己的系统上获得相同的测试结果


顺便说一下,如果托管提供程序的系统只会从比特桶中提取提交,那么您应该考虑将该密钥设置为部署密钥:

我不确定比特桶,但是在github上,需要您
git配置user.name
git配置user.email才能连接。您能告诉我如何连接吗?从哪里来?对不起,为了公平起见,我可以在谷歌上搜索:)看到了吗?我的意思是,我必须推遥控器,就这样?谢谢吉姆,我今晚会试试你说的,我会让你知道的。非常感谢!我终于成功克隆了我需要的回购协议!再次感谢你的回答。
ssh-add ~/.ssh/id_rsa