SSH key设置没问题,之前也一直用的没问题。
从最近的某天开始会提示:
$ git push
Username for 'https://github.com':
ssh -T git@github.com
也是能正常返回GitHub用户名的。
为情所困2017-04-28 09:07:29
You are using https protocol
And ssh -T git@github.com is obviously the ssh protocol
Change the git address to ssh protocol
phpcn_u15822017-04-28 09:07:29
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.