IntelliJ IDEA 2023更新git凭据

背景:

已知原来从远程仓库获取的项目,需要更新git用户和密码,但是又不想删除本地项目环境(不想重新获取新建项目)。

报错:

remote: HTTP Basic: Access denied. The provided password or token is incorrect or your account has 2FA enabled and you must use a personal access token instead of a password. See XXXXX

解决方法一:

file->setting->版本控制->gitlab->删除原来的凭据,新建凭据->应用->服务器输入git远程仓库如(http://XXXX)->令牌输入用户名如->生成

->跳转到Gitlab网页端User SettingsAccess tokens-> add new token ->复制到idea令牌输入框

解决方法二:

直接禁用掉gitlab插件,操作远程仓库时,idea会自动弹窗要求重新输入用户名和密码。

file->setting->plugins->已安装列表->搜索gitlab->disable->确定

结语:

方法一生成token有效期最大只能11个月,建议使用方法二。

相关推荐
誰能久伴不乏3 小时前
看懂 Git 团队协作全流程:分支、提交、PR、rebase 到底在干嘛
git
sunshine22 girl8 小时前
git tag-项目流程
git
imDwAaY1 天前
6篇文章讲清楚Git:Git 远程协作:fetch、pull、push 到底有什么区别?(3/6)
git·后端
imDwAaY1 天前
6篇文章讲清楚Git:Git 撤销与恢复:reset、revert、restore 应该怎么选?(4/6)
git
用户73309646123091 天前
再也不怕手滑丢代码!给 git 高危操作加一层安全校验
git
广白1 天前
Git Tag 实战:从出包追溯到版本发布
前端·git·面试
Winlifes6 天前
我给 Codex 做了一个 Git 面板:分支树、提交历史和工作区操作
git
郑州光合科技余经理7 天前
同城外卖小程序开发:下单成功后,后台导出能不能对上用户端状态
开发语言·前端·git·后端·uni-app·php·ai编程
我命由我123457 天前
Git 推送报错:error: src refspec main does not match any
运维·git·gitee·github·运维开发·学习方法·版本控制
Lcr3s7 天前
Git基础之(0):如何在Ubuntu(Linux)上安装git
git