SSH key设置没问题,之前也一直用的没问题。
从最近的某天开始会提示:
$ git push Username for 'https://github.com':
ssh -T git@github.com
也是能正常返回GitHub用户名的。
人生最曼妙的风景,竟是内心的淡定与从容!
You are using https protocol And ssh -T git@github.com is obviously the ssh protocol
Change the git address to ssh protocol
git remote remove origin #remove
git remote add origin git@github.com:Username/Your_Repo_Name.git #changessh
git push --set-upstream #I can’t remember the last command clearly. Anyway, enter git push first, and then there will be a prompt. Just enter it as prompted.
You are using https protocol
And ssh -T git@github.com is obviously the ssh protocol
Change the git address to ssh protocol
git remote remove origin
#remove
git remote add origin git@github.com:Username/Your_Repo_Name.git
#changessh
git push --set-upstream
#I can’t remember the last command clearly. Anyway, enter git push first, and then there will be a prompt. Just enter it as prompted.