web-dev-qa-db-ja.com

BitBucketにプッシュしようとしていますが、「マスターconq:リポジトリアクセスが拒否されました」というメッセージが表示されます。 「致命的:リモートエンドが予期せずハングアップした」

私はこのようにして、ビットバケットリポジトリをプッシュ変更します。

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

このエラーはどういう意味ですか?どうすれば修正できますか?

Bitbucketのデバッグ情報:ssh -T -v [email protected]

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 [email protected]
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: [email protected] -- [email protected]
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: client_input_channel_req: channel 0 rtype [email protected] 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

認証されたユーザーに関係する問題がいくつかありますagent_smith上記。

19
user1077220

Sshアクセス(ssh://[email protected]/accountname/reponame.gitに似たsshBitBucketリポジトリアドレスなど)に関しては、次のことを再確認してください。

注:Windowsでは、 環境変数HOMEはデフォルトでは定義されていません 。確認してください。

13
VonC

リポジトリへの書き込み権限があることを確認してください。


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

ステップ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.
5
Igor Parra

このgitエラー:

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

修正方法:

  1. 〜/ .sshディレクトリにある公開および秘密のsshキーを吹き飛ばします
  2. 新しいsshキーを作成します。
  3. リポジトリのbitbucketにログインします。
  4. Bitbucketから古いsshキーを削除します。
  5. 新しいsshキーをbitbucketに追加します。
  6. もう一度試してから、sshは正しいユーザーとbitbucketとネゴシエートします。

これは何が原因ですか?

クライアントマシンのsshがbitbucketとのネゴシエーションに使用していた資格情報が、bitbucketにこれが無許可のユーザーであると思わせるような方法で変更されました。

2
Eric Leschinski

Mac OSXまたはLinuxを使用している場合、私にとってうまくいったのは、ssh-agentがロードされ、私のキーで実行されていることを確認することです。

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

エージェントが実行されているかどうかを確認します。上記のような結果が表示されるはずです。上記の結果が表示されない場合は、次のように入力できます

$ eval ssh-agent $Shell

ssh-agentを手動で起動します。次に、キーが実行されているかどうかを確認します。タイプ

$ 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)

上記の結果が表示されます。そうでない場合は入力できます

$ ssh-add ~/.ssh/workid

ここで、workidは、生成した秘密鍵セットの名前です。

このリンクから直接取得: GitBash、Mac OSX、およびLinux用に複数のSSH IDを構成する

1
Daniel