2017-05-04 3 views
0

現在、WindowsからMacにファイルを移行しています。そのうちの1つはすべて私のgitリポジトリです。私がWindows上で行ったことは、私の.ppkとパテント・ジェネレータから生成された公開鍵を、Pageantを使用して.ppkファイルを追加し、git repoからクローンを作成することです。私はWindowsでGitExtensionを使用しています。私の秘密鍵を使ってWindows上で動作している間にMac上でクローンを実行できません

これでMac上で、ローカルのrepoフォルダを作成し、そこにすべての複製されたリポジトリが保存されます。私の公開鍵と秘密鍵を〜/ .ssh /に入れてください。

MACBOOKs-MacBook-Pro:.ssh username$ git clone 
    [email protected]:repositories/project-repo.git 
    Cloning into 'project-repo'... 
    Enter passphrase for key '/Users/username/.ssh/user_git.ppk':  
    [email protected]'s password:  
    Permission denied, please try again. 
    [email protected]'s password:  
    Permission denied, please try again. 
    [email protected]'s password:  
    Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password). 
    fatal: Could not read from remote repository. 
    Please make sure you have the correct access rights 
    and the repository exists. 

私は窓からクローンを作成するたびに:私はすべてを取得イムまだセットアップされたが、ことを考えてい

 Host 192.168.20.4 
     User git 
     HostName 192.168.20.4 
     IdentityFile ~/.ssh/user_git.ppk 

:との〜/ .ssh/configに編集され、このような何かを追加しました秘密鍵は、パスワードやパスフレーズを尋ねません。

私もGitKrakenを使用して、そこPRIVATE_KEYを使用しますが、まだ許可は、私はすでにマック複数の時間窓から鍵をコピーしたが、それでもまったく動作しない

を否定しています。

まだ設定されていない設定はありますか?

ありがとうございました!

答えて

1

PPKは、秘密鍵のPuTTY固有の形式です。 OpenSSH形式のキーに変換する必要があります。

$ puttygen user_git.ppk -O private-openssh -o user_git 

See this answer for more details

+0

私はちょうどあなたのリンクからチュートリアルに続き、の〜/ .ssh/configに秘密鍵を使用:同じように、私は、ホストは、プロジェクト固有のIPであるべきだと思う、とホスト名はgithubののIPにする必要があります。そして今、それは動作します!ありがとう –

0

あなたのホストとホスト名が同じIPに見えます。

# Foo Account 
Host github.com-foo 
    HostName github.com 
    User git 
    IdentityFile ~/.ssh/foo.pem 
関連する問題