我可以使用我的username
和password
登录到 github。我最近使用 HTTPS 克隆了我的一个 repos,并做了更改。但是,当我想推:
我显示提示Username for 'https://github.com':
。我写我的用户名。然后它要求Password for 'https://username@github.com':
。但我的用户名不是https://username@github.com':
。它是username
。无论如何,当我使用与登录 github 时相同的password
和username
时,它不起作用。
我的配置有remote.origin.url=https://github.com/username/some-repo.git
形式的行。就像我第一次使用 HTTPS 克隆时一样。
我已经尝试添加https://username@github.com/username/some-repo.git
。它与在提示符下提供username
没有什么不同。它不知何故仍然认为我的用户名是https://username@github.com
。
我不明白为什么这对我来说总是一个问题,尽管 HTTPS 是默认方式,但我总是切换到使用 SSH。在我看来,应该有一种使用 HTTPS 的方法,不仅可以克隆回购,还可以在之后推送。
Github 删除了使用用户名-密码组合的选项。
https://github.blog/changelog/2021-08-12-git-password-authentication-is-shutting-down/你应该切换到 ssh,而不是更好
本站系公益性非盈利分享网址,本文来自用户投稿,不代表码文网立场,如若转载,请注明出处
评论列表(46条)