我可以使用我的username
和password
. 我最近使用 HTTPS 克隆了我的一个存储库并进行了更改。但是,当我想推送时:
Username for 'https://github.com':
。我写我的用户名。然后它要求Password for 'https://[email protected]':
. 但是我的用户名不是https://[email protected]':
. 它是username
。不管怎么说,当我用同样的它不工作password
,并username
在对github上记录期间我使用。remote.origin.url=https://github.com/username/some-repo.git
. 就像我第一次使用 HTTPS 克隆时一样。https://[email protected]/username/some-repo.git
. 这与提供username
in 提示没有什么不同。它以某种方式仍然认为我的用户名是https://[email protected]
.我不明白为什么这对我来说总是一个问题,尽管 HTTPS 是默认方式,但我总是切换到使用 SSH。在我看来,应该有一种方法可以使用 HTTPS 不仅用于克隆 repo,而且还可以在之后进行推送。我总是遇到问题并选择了临时解决方案,但由于我的懒惰而从未解决过这个问题,但在这里我要加倍努力。
Github 删除了使用用户名密码组合的选项。
https://github.blog/changelog/2021-08-12-git-password-authentication-is-shutting-down/
您应该改用 ssh,这要好得多
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句