Warning: Permanently added ‘github.com,192.30.255.112’ (RSA) to the list of known hosts. Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
なのでssh鍵の作成とGithubに公開鍵を登録します。
ssh鍵の作成
秘密鍵のファイル名は今回はデフォルトでやってます。
ssh-keygen
Enter file in which to save the key (/home/vagrant/.ssh/id_rsa): [ファイル名]
Enter passphrase (empty for no passphrase):[パスワード]
Enter same passphrase again:[パスワード確認]
公開鍵をGithubに登録する
Githubにログインします。
[setting]-[SSH and GPG keys]に移動
[new SSH]をクリックし、タイトルとkeyを入力
keyは.pubの内容を入れます。
Githubにアクセス出来るか確認
次のようなメッセージがでたら成功
ssh -T git@github.com
Hi xxxxx You've successfully authenticated, but GitHub does not provide shell access.
Githubからリポジトリをcloneする
git cloneでリポジトリを指定してパスワードを入れて
git clone git@github.com:xxxxx/xxxxx.git
Enter passphrase for key '/home/vagrant/.ssh/id_rsa':[パスワード入力]
ディスカッション
コメント一覧
まだ、コメントがありません