问题描述

idea上操作git在update和fetch时报错:

10:14	Update failed
			Authentication failed for 'http://git.xxx.com/xxx/xxx.git/'
 
10:14	Update canceled

报错原因

git身份认证到期,需重新认证

解决方案

1.打开gitlab - 用户设置 - 访问令牌

名称: 输入一个名称(需记忆)

到期时间:不填

范围:勾选read_repository 和 write_repository,其他不选

单击 Create personal access token,生成个人访问令牌

到页面最上方,在 Your new personal access token 中,已生成了最新的访问令牌(该令牌需记忆)

2.Windows系统,打开控制面板 - 用户账户 - 凭据管理器 - Windows凭据

普通凭据的git地址展示

单击地址最右边的下拉小箭头,单击编辑

编辑普通凭据,将刚才设置的名称输入到用户名处,令牌输入到密码处,单击保存即可

3.回到idea页面,重新update或者fetch,成功

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐