首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Git身份验证失败,远程:无效用户名或密码

Git身份验证失败,远程:无效用户名或密码
EN

Stack Overflow用户
提问于 2022-07-14 17:21:15
回答 1查看 247关注 0票数 1

我试图将本地回购中的一些编辑推到我的GitHub上,但我得到了以下错误:

代码语言:javascript
复制
(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钥匙似乎是工作。

EN

回答 1

Stack Overflow用户

发布于 2022-07-15 04:51:15

我的SSH密钥似乎起作用了。

考虑到使用的远程URL是HTTPS,您的SSH密钥根本不被使用。

如果您想使用SSH:

代码语言:javascript
复制
cd /path/to/repo
git remote set-url origin git@github.com:herasyed/MechaCar_Statistical_Analysis.git
git push

看推送是否成功。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/72984387

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档