$ git push Username for 'https://github.com': Password for 'https://Username@github.com': Counting objects: 562, done. Delta compression using up to 4 threads. Compressing objects: 100% (542/542), done. Writing objects: 100% (561/561), 2.51 MiB | 69.00 KiB/s, done. Total 561 (delta 79), reused 0 (delta 0)

 

因为你用的是https而不是ssh。 你可以更新一下origin

git remote remove origin
git remote add origin git@github.com:Username/Your_Repo_Name.git

之后你还需要重新设置track branch,比如:

git branch --set-upstream-to=origin/master master

对于HTTPS方式,你可以在~/.netrc文件里设定用户名密码,不过这样的风险在于密码是明文存放在这个文件里的,比较容易泄露

machine github.com
login Username
password Password

相关文章:

  • 2021-05-03
  • 2021-10-26
  • 2022-12-23
  • 2021-12-29
  • 2022-12-23
  • 2021-06-18
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-10-14
  • 2021-04-29
  • 2022-12-23
  • 2022-01-19
  • 2021-09-12
  • 2022-12-23
相关资源
相似解决方案