github配置

按照网上的配置,生成了ssh秘钥,github上也添加了相应的秘钥,push时还是显示错误。

Agent admitted failure to sign using the key.

permission denied(publickey)

fatal:could not read from remote repository.

解决方法:
ssh-add id_rsa
git config --global user.name
git config -- global user.email

具体步骤:

1.ssh-keygen -t rsa -C "xxx"

2.ssh-add id_rsa

3.github添加id_rsa.pub秘钥

4.git init

5.git add xx

6.git commit -m "xx"

7.git remote add xx [email protected]:xx/xx.git

8.git config --global user.name

9.git config -- global user.email

10.git push -u xx master

你可能感兴趣的:(github配置)