我试图将本地回购中的一些编辑推到我的GitHub上,但我得到了以下错误:
(base) herasyed@MacBook-Air-3 MechaCar_Statistical_Analysis % git add .
(base) herasyed@MacBook-Air-3 MechaCar_Statistical_Analysis % git status
On branch main
Your branch is up to date with 'origin/main'.
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
new file: .DS_Store
renamed: MechaCarChallenge.R -> R Code/MechaCarChallenge.R
(base) herasyed@MacBook-Air-3 MechaCar_Statistical_Analysis % git push
remote: Invalid username or password.
fatal: Authentication failed for 'https://github.com/herasyed/MechaCar_Statistical_Analysis.git/'我可以从我的吉特罚款和我的SSH钥匙似乎是工作。
发布于 2022-07-15 04:51:15
我的SSH密钥似乎起作用了。
考虑到使用的远程URL是HTTPS,您的SSH密钥根本不被使用。
如果您想使用SSH:
cd /path/to/repo
git remote set-url origin git@github.com:herasyed/MechaCar_Statistical_Analysis.git
git push看推送是否成功。
https://stackoverflow.com/questions/72984387
复制相似问题