2016-12-26 3 views
0

bitbucketでssh接続でgitを使用したいが、git cloneは致命的なエラーを返す。bitbucketでsshでgitを使用するにはどうすればいいですか

私はsshtestという名前のリポジトリを作成しました。正しいsshキーを使用していることを確信しています。次のようなsshコマンドで確認します。

エラーを発生させるためのアイデアはありますか?

$ ssh -T [email protected] # show nothing 
$ ssh [email protected] 
PTY allocation request failed on channel 0 
logged in as username. 

You can use git or hg to connect to Bitbucket. Shell access is disabled. 
Connection to bitbucket.org closed. 

$ git clone [email protected]:username/sshtest.git 
Cloning into 'sshtest'... 
fatal: Could not read from remote repository. 

Please make sure you have the correct access rights 
and the repository exists. 

答えて

0

私はあなたが自分自身のBitbucketアカウントで概説する手順、テストレポ、およびキーを複製し、それが何の問題もなく働いた:

[[email protected]:~/Projects] [16:37 CST] 
# git clone [email protected]:vwal/testrepo.git    
Cloning into 'testrepo'... 
Enter passphrase for key '/home/ville/.ssh/keys/gitkey/gitkey': 
remote: Counting objects: 65, done. 
remote: Compressing objects: 100% (36/36), done. 
remote: Total 65 (delta 17), reused 0 (delta 0) 
Receiving objects: 100% (65/65), 4.85 KiB | 0 bytes/s, done. 
Resolving deltas: 100% (17/17), done. 
[[email protected]:~/Projects] [16:38 CST] 

これは、何かがまだあなたと間違っていると思うし、私をリードBitbucket側のリポジトリアクセス設定(あなたのテストではBitbucketに接続できるようにユーザーを設定しましたが、特定のリポジトリには接続できません)。アクセスユーザー名にBitbucketのsshtestリポジトリへの十分なアクセス権を与えてもよろしいですか? Bitbucketのリポジトリにアクセスして、の設定>ユーザとグループアクセスを選択し、アクセスユーザ名に少なくともを入力してください。にアクセスしてください。

+0

ありがとうございます。 'sshtest'リポジトリは私自身のリポジトリなので、管理者権限があり、設定には" username has already have access "と書かれています。 不思議なことに、ssh認証を使ってsourcetree経由でウィンドウからリポジトリをクローンすることができました。 –

関連する問題