首先呢,我已经弄好了ssh的密钥,ssh -T git@githun.com是可以的,返回:
Hi xxxxxx! You've successfully authenticated, but GitHub does not provide shell access.
但是,当我想要git push的时候,总是失败,提示是:
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
FATAL Something's wrong. Maybe you can find the solution here: xxxxxxxxxxxx
请问这是什么情况,
我执行的是
git remote add origin git@github.com:xxxxxxx/test.git
git push -u origin master
Gitのユーザー名とメールアドレスを設定します
リーリーSSHキーを生成する
リーリーSSH にキーを追加します: ssh-add ファイル名。その前にパスワードを入力する必要があります。
github に ssh キーを追加します。追加する必要があるのは、「id_rsa.pub」の公開キーです。https://github.com/ を開いて設定にキーを追加します
リーリー