本文介绍了Jenkins-使用GIT_ASKPASS设置凭据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在Jenkins中为bitbucket设置了一些凭据,并仔细检查了凭据设置(例如,手动登录),但是当我在Jenkins中尝试时,它会一直旋转直到给出以下输出:

I've set up some credentials in Jenkins for bitbucket and double-checked the Credentials settings (e.g. logging in manually) however when I try it in Jenkins it just spins forever giving this output:

> git config remote.origin.url <bitbucket url> # timeout=10
Fetching upstream changes from <bitbucket url>
> git --version # timeout=10
using GIT_ASKPASS to set credentials <bitbucket account email> Bitbucket
> git fetch --tags --progress <bitbucket url> +refs/heads/*:refs/remotes/origin/*
> git fetch --tags --progress <bitbucket url> +refs/heads/*:refs/remotes/origin/*

请注意,公开时该URL很好.但是,当设置为专用"时,它只会失败而没有输出.

Note that the URL is fine when public. But when set to Private it simply fails with no output.

反正还有更多细节可以调试吗?

Is there anyway to debug this in a bit more detail?

推荐答案

我在Windows服务器上使用Jenkins遇到了类似的问题.我使用凭据管理器安装了git,并且每当它尝试签出私有存储库时,它将等待我在服务器中手动输入凭据.禁用git凭证管理器为我修复了该问题.

I had a similar issue, with Jenkins on a Windows server. I installed git with credentials manager and whenever it tried to checkout a private repository, it would wait for me to input credentials manually in the server. Disabling the git credential manager fixed it for me.

我已经可以选择在git插件中输入凭据,因此不需要单独的凭据管理器.

I already had an option to input credentials in the git plugin so didn't need a separate credentials manager.

这篇关于Jenkins-使用GIT_ASKPASS设置凭据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-05 12:42