无法连接到存储库 - Jenkins + Codebase Git 上的 401

Jos*_*erk 3 git jenkins

我试图让 Jenkins 使用 Git 作为我们的 SCM,并且设置它有点痛苦。

指定要使用的 Codebase Git 存储库时,请使用以下格式:

https://our.domain.com/repository/repository.git
Run Code Online (Sandbox Code Playgroud)

我从詹金斯收到以下错误:

Failed to connect to repository : Failed to connect to https://our.domain.com/repository/repository.git (status = 401)
Run Code Online (Sandbox Code Playgroud)

该存储库是私有的,我不确定如何为其配置用户帐户。我在我的 Ubuntu 服务器上为 Jenkins 用户生成了一个 RSA SSH 密钥,并将其作为部署密钥添加到代码库中。

我不断收到 404 错误?

另外,如果我尝试

git@codebasehq.com:.../repository.git
Run Code Online (Sandbox Code Playgroud)

格式,我只是从 Jenkins 得到一个不同的错误:

Failed to connect to repository : Command "ls-remote -h git@codebasehq.com:.../repository.git HEAD" returned status code 128:
stdout: 
stderr: Host key verification failed. 
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
Run Code Online (Sandbox Code Playgroud)

小智 6

我迟到了,但将来这将对其他人有所帮助

插入的

https://username@bitbucket.org/username/repo.git
Run Code Online (Sandbox Code Playgroud)

替换这个

https://bitbucket.org/username/repo.git
Run Code Online (Sandbox Code Playgroud)

在 Git 存储库 URL 中