每当我尝试进入我的存储库时,git都会要求提供两个username & password。
每次重新输入密码都没有问题,但问题在于输入用户名。我使用https来克隆我的存储库。
那么,我该如何配置git,使其不会在每个git push上都请求username。
我是linux的新手,但windows git push中的IIRC只要求输入密码。
发布于 2020-12-07 07:43:23
解决这个问题的正确方法是将http更改为ssh。
您可以使用此git remote rm origin删除您的远程存储库。
然后,您可以使用ssh sintax (可以从github复制)重新添加它:git remote add origin git@github.com:username/reponame.git。
请查看这篇文章。https://www.freecodecamp.org/news/how-to-fix-git-always-asking-for-user-credentials/
https://stackoverflow.com/questions/11403407
复制相似问题