git提示密码自更新为2.36.1

发布于 2025-02-05 20:40:37 字数 334 浏览 2 评论 0原文

我们多年来使用了Git的GitLab安装多年。我们有SSH键设置,因此简单的git push不会提示获得凭据。

由于更新为2.36.1,因此我们现在正在提示我们在git push上获取密码。麻烦是,我们启用了MFA,因此提供密码不起作用。

我不知道这是否相关,但是我们也被警告说,存储库是其他人所有的,并遵循该建议git config -global -global -add safe.directory *foldername *

i 've尝试添加一个新的RSA SSH键,但没有帮助。

有什么想法吗?

we have been using git for years with a local gitlab installation. We have ssh keys setup, so a simple git push would not prompt for credentials.

since updating to 2.36.1, we are now being prompted for a password on git push. trouble is, we have MFA enabled, so providing the password doesn't work.

I don't know if this is relevant, but we were also warned that the repository was owned by someone else and followed the suggestion to git config --global --add safe.directory *foldername*

I've tried adding a new RSA ssh key and it hasn't helped.

any ideas?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

差↓一点笑了 2025-02-12 20:40:37

密码或MFA(意味着将令牌作为密码)仅与HTTPS URL有关。
对于SSH,如果创建了私钥加密,则可能需要处理密码。

因此,首先检查什么git Remote -v返回存储库中的内容。
如果它实际上是HTTPS,请检查git config -global recertential.helper的输出:它可能已为您的gitlab帐户缓存了一个过时的密码。

A password or MFA (meaning using a token as a password) should only be relevant for an HTTPS URL.
For an SSH one, you might need to deal with a passphrase, if your private key was created encrypted.

So check first what git remote -v returns inside your repository.
If it is actually an HTTPS one, check the output of git config --global credential.helper: it might have cached an obsolete password for your GitLab account.

记忆里有你的影子 2025-02-12 20:40:37

使用

ssh -Vt

表明我的RSA密钥正在尝试,并且GIT正在回到密码。

我添加了一个新的ED25519键,其中

ssh -keygen -T ED25519

它起作用!因此,新版本的Git不喜欢我的旧RSA键?

编辑:即使我添加了一个新的RSA密钥和 Thought 我已经配置了SSH来使用它,但冗长的测试表明它没有被尝试。因此,要么根本不喜欢RSA键,要么,如果我给它默认名称,那么新的RSA键也会奏效。

doing a verbose test with

ssh -vT [email protected]

showed that my rsa key was being attempted and that git was falling back to password.

I added a new ed25519 key with

ssh-keygen -t ed25519

and it works! so the new version of git doesn't like my old RSA key?

EDIT: even though I added a new RSA key and thought I had configured ssh to use it, the verbose test showed that it wasn't being tried. So either it doesn't like RSA keys at all, or a new RSA key would have worked just as well if I'd given it the default name.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文