gpt4 book ai didi

git - ERROR : Couldn't find any revision to build. 验证此作业的存储库和分支配置

转载 作者:太空狗 更新时间:2023-10-29 13:22:57 25 4
gpt4 key购买 nike

我是 Jenkins(和 Stackoverflow)的新手,我正在设置一个简单的 Jenkins 作业来轮询 git 存储库。

1) 我在我的本地机器上创建了一个 git 仓库。2) 我创建了一个 Jenkins Freestyle 作业,并在配置屏幕上输入了以下参数:

存储库 URL:media@127.0.0.1:/home/media/git_repo_remote凭据:无

“存储库 URL”文本字段下出现以下错误:

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

请确保您拥有正确的访问权限并且存储库存在。

然后我将存储库 URL 更改为“https:///127.0.0.1/home/media/git_repo_remote”并在日志中收到以下内容:

Started by an SCM change
Building in workspace /var/lib/jenkins/workspace/First Job
> git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> git config remote.origin.url https:///127.0.0.1/home/media/git_repo_remote # timeout=10
Fetching upstream changes from https:///127.0.0.1/home/media/git_repo_remote
> git --version # timeout=10
> git fetch --tags --progress https:///127.0.0.1/home/media/git_repo_remote +refs/heads/*:refs/remotes/origin/*
> git rev-parse refs/remotes/origin/master^{commit} # timeout=10
> git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
> git rev-parse origin/master^{commit} # timeout=10
ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.
Finished: FAILURE

如有任何帮助,我们将不胜感激。

谢谢

最佳答案

请检查您的分支,其中存储库托管 main 或 Master

如果存储库托管在 main 中,那么要构建到 */main 的分支如果存储库托管在 master 中,则分支构建到 */master

关于git - ERROR : Couldn't find any revision to build. 验证此作业的存储库和分支配置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44554176/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com