简体   繁体   English

试图推送到BitBucket,但我得到“主要conq:存储库访问被拒绝。”“致命:远程端意外挂断”

[英]Trying to push to BitBucket but I get “master conq: repository access denied.” “fatal: The remote end hung up unexpectedly”

I'm doing like this to push changes my bitbucket repository: 我这样做是为了推动我的bitbucket存储库的更改:

$: git push origin 
master conq: repository access denied. 
fatal: The remote end hung up unexpectedly

What does this error mean and how do I fix it? 这个错误意味着什么,我该如何解决?

Debug info for bitbucket: ssh -T -v git@bitbucket.org bitbucket的调试信息: ssh -T -v git@bitbucket.org

OpenSSH_5.3p1, OpenSSL 1.0.0-fips 29 Mar 2010
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to bitbucket.org [131.103.20.167] port 22.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: identity file /root/.ssh/identity type -1
debug1: identity file /root/.ssh/identity-cert type -1
debug1: identity file /root/.ssh/id_rsa type 1
debug1: identity file /root/.ssh/id_rsa-cert type -1
debug1: identity file /root/.ssh/id_dsa type -1
debug1: identity file /root/.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*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.3
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: Host 'bitbucket.org' is known and matches the RSA host key.
debug1: Found key in /root/.ssh/known_hosts:5
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: /root/.ssh/identity
debug1: Offering public key: /root/.ssh/id_rsa
debug1: Remote: Forced command: conq deploykey:435246
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 277
debug1: read PEM private key done: type RSA
debug1: Remote: Forced command: conq deploykey:435246
debug1: Remote: Port forwarding disabled.
debug1: Remote: X11 forwarding disabled.
debug1: Remote: Agent forwarding disabled.
debug1: Remote: Pty allocation disabled.
debug1: Authentication succeeded (publickey).
debug1: channel 0: new [client-session]
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug1: Sending environment.
debug1: Sending env LANG = en_US.UTF-8
authenticated via agent_smith.


You can use git or hg to connect to Bitbucket. Shell access is disabled.

This deploy key has read access to the following repositories:

myserver/scripts: root@myserver.stuff.com -- root@myserver.stuff.com
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: client_input_channel_req: channel 0 rtype eow@openssh.com reply 0
debug1: channel 0: free: client-session, nchannels 1
Transferred: sent 2440, received 3032 bytes, in 0.0 seconds
Bytes per second: sent 58903.0, received 73194.2
debug1: Exit status 0

It's some problem that has to do with the authenticated user agent_smith above. 这是与上面经过身份验证的用户agent_smith的一些问题。

In term of ssh access (like an ssh BitBucket repo address similar to ssh://git@bitbucket.org/accountname/reponame.git , double-check: 在ssh访问方面(如ssh BitBucket repo地址类似于ssh://git@bitbucket.org/accountname/reponame.git ,请仔细检查:

Note: on Windows, then environment variable HOME isn't defined by default . 注意:在Windows上, 默认情况下未定义环境变量HOME Make sure it is. 确保它是。

Check that you have write permission on repo. 检查您是否拥有repo的写入权限。


AND from https://confluence.atlassian.com/display/BITBUCKET/Set+up+SSH+for+Git#SetupSSHforGit-Step4Createaconfigfile : 来自https://confluence.atlassian.com/display/BITBUCKET/Set+up+SSH+for+Git#SetupSSHforGit-Step4Createaconfigfile

Step 4. Create a SSH config file 步骤4.创建SSH配置文件

 Using your favorite text editor, edit an existing (or create a new) ~/.ssh/config file. Add an entry to the configuration file using the following format: Host bitbucket.org IdentityFile ~/.ssh/privatekeyfile The second line is indented. That indentation (a single space) is important, so make sure you include it. The second line is the location of your private key file. If you are following along with these instructions, your file is here: ~/.ssh/id_rsa When you are done editing, your configuration looks similar to the following: Host bitbucket.org IdentityFile ~/.ssh/id_rsa Save and close the file. Restart the GitBash terminal. 

This git error: 这个git错误:

$: git pull
master conq: repository access denied. 
fatal: The remote end hung up unexpectedly

Remedied by: 补救:

  1. Blow away the public and private ssh keys in your ~/.ssh directory 吹掉〜/ .ssh目录中的公钥和私钥ssh密钥
  2. Create new ssh keys. 创建新的ssh密钥。
  3. Log in to bitbucket for your repository. 登录到您的存储库的bitbucket。
  4. Delete the old ssh key from bitbucket. 从bitbucket中删除旧的ssh密钥。
  5. Add your new ssh key to bitbucket. 将新的ssh密钥添加到bitbucket。
  6. Try it again, then ssh negotiates with bitbucket with the correct user. 再试一次,然后ssh与bitbucket与正确的用户协商。

What caused this? 是什么造成的?

The credentials that ssh on the client machine was using to negotiate with bitbucket had changed in such a way as to cause bitbucket to think that this is an unauthorized user. 客户端计算机上ssh用于与bitbucket协商的凭据已经改变,导致bitbucket认为这是一个未经授权的用户。

If you are using Mac OSX or Linux what worked for me is ensuring that ssh-agent is loaded and running with my keys. 如果您使用的是Mac OSX或Linux,对我来说有用的是确保加载ssh-agent并使用我的密钥运行。

$ ps -e | grep [s]sh-agent
9060 ??     0:00.28 /usr/bin/ssh-agent -l

checks to see if the agent is running. 检查代理是否正在运行。 You should see something like the above results. 您应该看到类似上述结果的内容。 If you do not see the above results, you can type 如果您没有看到上述结果,可以输入

$ eval ssh-agent $SHELL

to start the ssh-agent by hand. 手动启动ssh-agent。 Next you want to check to see if the keys are running. 接下来,您要检查密钥是否正在运行。 Type 类型

$ ssh-add -l
2048 68:ef:d6:1e:4b:3b:a3:52:6f:b0:c3:4b:da:e8:d1:9f /c/Documents and Settings/manthony/.ssh/personalid (RSA)

and you should see the above results. 你应该看到上面的结果。 If you don't you can type 如果你不能,你可以打字

$ ssh-add ~/.ssh/workid

where workid is the name of your private keyset you generated. 其中workid是您生成的私钥集的名称。

taken directly from this link: Configure multiple SSH identities for GitBash, Mac OSX, & Linux 直接来自此链接: 为GitBash,Mac OSX和Linux配置多个SSH身份

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 gitlab-&gt; git push -u origin master-&gt;访问被拒绝,致命:远程端意外挂断 - gitlab -> git push -u origin master ->access denied, fatal: The remote end hung up unexpectedly BitBucket 无法推送,“致命:远程端意外挂断” - BitBucket cannot push, "fatal: The remote end hung up unexpectedly" 致命:远程端在初始推送到 bitbucket 时意外挂断 - fatal: the remote end hung up unexpectedly on initial push to bitbucket git push heroku master Permission denied(publickey)。致命:远程端意外挂断 - git push heroku master Permission denied (publickey). fatal: The remote end hung up unexpectedly 带有 Bitbucket 错误的 Sourcetree:致命:远程端意外挂断 - Sourcetree with Bitbucket Error: fatal: The remote end hung up unexpectedly Git push给出了拒绝权限(公钥)。 致命:远端意外挂断。 我该怎么办? - Git push gives Permission denied (publickey). fatal: The remote end hung up unexpectedly. What should I do? GitHub:权限被拒绝(公钥)。 致命:远端意外挂断 - GitHub: Permission denied (publickey). fatal: The remote end hung up unexpectedly gitlab-shell - > git push -u origin master - >致命:远程端意外挂断 - gitlab-shell -> git push -u origin master -> fatal: The remote end hung up unexpectedly 致命:推送到Git存储库时,远程端意外挂断 - Fatal: The remote end hung up unexpectedly while pushing to Git repository 推送时出现git错误:“致命:远程端意外挂断” - git error on push : “fatal: The remote end hung up unexpectedly”
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM