Eclipse连接开启2FA的GitLab报“authentication not supported”错误求助
解决Eclipse 4.21.0 GitLab 2FA认证失败问题
一、重置Eclipse存储的旧Git凭据
Eclipse可能缓存了未启用2FA时的旧密码,导致认证失败,先清理这些缓存:
- 打开Eclipse,依次点击
Window→Preferences→General→Security→Secure Storage - 切换到
Contents标签,展开org.eclipse.egit.core条目,找到对应GitLab仓库的认证记录,选中后点击Delete删除 - 如果找不到对应条目,可点击
Secure Storage页面的Reset Password按钮,重置整个安全存储(会清除所有Eclipse保存的凭据,操作前确认无重要内容)
二、强制Eclipse使用Windows凭据管理器
让Eclipse调用系统Git的凭据配置,而非内置存储:
- 先确认本地Git凭据助手配置正确,打开bash执行:
git config --global credential.helper manager-core - 在Eclipse中同步系统Git设置:
- 打开
Window→Preferences→Team→Git→Configuration - 切换到
System Settings标签,确认credential.helper的值为manager-core;若未找到,切换到User Settings标签,点击Add Entry,输入键credential.helper,值manager-core
- 打开
- 设置Eclipse的Git凭据存储为系统原生:
- 打开
Window→Preferences→Team→Git→Credentials - 将
Default store选项改为Native,Eclipse会直接调用Windows凭据管理器中的存储内容
- 打开
三、手动输入个人访问令牌完成认证
若上述步骤无效,在Eclipse执行拉取/推送操作时,弹出认证对话框后:
- 用户名填写你的GitLab账号
- 密码填写已生成的个人访问令牌(PAT)
- 勾选
Save password选项,让Eclipse将PAT存入安全存储,后续操作即可自动认证
内容的提问来源于stack exchange,提问作者mkours
相关产品推荐
相关产品推荐

