git push 时 出现 Username for ‘https://github.com’:
配置ssh
1
2
3
4
5
6
git config --global user.name "用户名"
git config --global user.email "邮箱"
ssh-keygen -C '邮箱' -t rsa
cat ~/.ssh/id_rsa.pub
复制得到的密钥到github账户ssh key
git push 时 出现 Username for ‘https://github.com’:
git clone时 用的是 https://
,需要.git/config中
改成 git@
开头的格式