Jenkins 在 Visual Studio Online 中找不到我的 git 存储库
Jenkins does not find my git repository in Visual Studio Online
我有一个使用 Git 的 Visual Studio 在线项目。 Visual Studio 内部一切正常。然后我试图配置一个 Jenkins 作业,从这个项目中获取代码,但没有成功。虽然 URL 和凭据正确,但 Jenkins 在作业配置页面上给我这个错误:
Failed to connect to repository : Command "git.exe -c core.askpass=true ls-remote -h https://[username]:[pwd]@[domain].visualstudio.com/defaultcollection/_git/[project] HEAD" returned status code 128:
stdout:
stderr: fatal: repository 'https://[username]:[pwd]@[domain].visualstudio.com/defaultcollection/_git/[project]/' not found
如果我保存并尝试构建,构建失败并出现以下错误:
unable to access 'HTTP://https:///[username]:[pwd]@[domain].visualstudio.com/defaultcollection/_git/[project]/': Could not resolve host: https
有人知道我能做什么吗?
谢谢
好吧,我终于让 Jenkins 执行了 Visual Studio 在线 git 存储库的克隆。
official Microsoft documentation is wrong. Jenkins and the Git plugin do not work as they explain there. In order to the clone operation to work, I had to put on the repository URL field the same URL used for clone in Visual Studio: https://[domain].visualstudio.com/defaultcollection/_git/[project].
此外,我必须使用用户名和密码在 Jenkins 上添加凭据才能成功连接。我在 Visual Studio Online 中使用备用凭据。
感谢大家的帮助。
我有一个使用 Git 的 Visual Studio 在线项目。 Visual Studio 内部一切正常。然后我试图配置一个 Jenkins 作业,从这个项目中获取代码,但没有成功。虽然 URL 和凭据正确,但 Jenkins 在作业配置页面上给我这个错误:
Failed to connect to repository : Command "git.exe -c core.askpass=true ls-remote -h https://[username]:[pwd]@[domain].visualstudio.com/defaultcollection/_git/[project] HEAD" returned status code 128: stdout: stderr: fatal: repository 'https://[username]:[pwd]@[domain].visualstudio.com/defaultcollection/_git/[project]/' not found
如果我保存并尝试构建,构建失败并出现以下错误:
unable to access 'HTTP://https:///[username]:[pwd]@[domain].visualstudio.com/defaultcollection/_git/[project]/': Could not resolve host: https
有人知道我能做什么吗?
谢谢
好吧,我终于让 Jenkins 执行了 Visual Studio 在线 git 存储库的克隆。
official Microsoft documentation is wrong. Jenkins and the Git plugin do not work as they explain there. In order to the clone operation to work, I had to put on the repository URL field the same URL used for clone in Visual Studio: https://[domain].visualstudio.com/defaultcollection/_git/[project].
此外,我必须使用用户名和密码在 Jenkins 上添加凭据才能成功连接。我在 Visual Studio Online 中使用备用凭据。
感谢大家的帮助。