栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

git报错:remote: [session-474e1980] Access denied fatal: unable to access... 403

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

git报错:remote: [session-474e1980] Access denied fatal: unable to access... 403

报错:

在输入git remote add origin连接远程仓库的时候报错

$ git push --set-upstream origin html
remote: [session-474e1980] Access denied
fatal: unable to access 
'https://gitee.com/huyi612/hm-dianping.git/':
 The requested URL returned error: 403
错误原因:

1.输入命令 cat ~/.gitconfig查看当前用户

之前在git bash中配过ssh指向的和远程的不符合,删除本地用户凭证再重新登录。

解决办法:

1、搜索凭据管理器----点击Window凭据–发现git:http://gitee.com有两条找到不与 cat ~/.gitconfig查看当前用户删除即可。
2、删除后打开终端输入git remote -v 命令 查看远程仓库地址

3、再输入 git remote rm origin 命令 删除远程地址

4、再添加新的地址 git remote add origin 你自己的项目git地址

$ git remote add origin https://gitee.com/gusongqi/hm-dianping.git

5、在输入之前的命令$ git push --set-upstream origin html 推送成功。

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/868153.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号