【问题标题】:Git fetch not fetching any branchesGit fetch没有获取任何分支
【发布时间】:2021-03-20 03:17:35
【问题描述】:

新设置的詹金斯没有扫描任何分支。我也尝试了全球信用和多管道信用。凭据是常规的 http 用户名和密码。

这是日志:

Started
[Tue Dec 08 16:12:29 UTC 2020] Starting branch indexing...
 > git --version # timeout=10
 > git --version # 'git version 2.11.0'
using GIT_ASKPASS to set credentials 
 > git ls-remote --symref -- https://gitlab.com/myusername/techworld-js-docker-demo-app.git # timeout=10
 > git rev-parse --is-inside-work-tree # timeout=10
Setting origin to https://gitlab.com/myusername/techworld-js-docker-demo-app.git
 > git config remote.origin.url https://gitlab.com/myusername/techworld-js-docker-demo-app.git # timeout=10
Fetching & pruning origin...
Fetching upstream changes from origin
 > git --version # timeout=10
 > git --version # 'git version 2.11.0'
 > git config --get remote.origin.url # timeout=10
using GIT_ASKPASS to set credentials 
 > git fetch --tags --progress --prune -- origin +refs/heads/*:refs/remotes/origin/* # timeout=10
[Tue Dec 08 16:12:36 UTC 2020] Finished branch indexing. Indexing took 7 sec
Finished: SUCCESS

【问题讨论】:

  • 您的分支名称是否符合“按名称过滤”部分中定义的正则表达式?
  • 是的,我也尝试删除正则表达式并使用.*,但它仍然不起作用。
  • 哦,正则表达式有问题。如果我选择Discovery branches,那么它可以工作。如果我选择正则表达式,则它不起作用

标签: git jenkins github jenkins-pipeline


【解决方案1】:

问题是我只选择了Filter by name (regex),但没有选择Discover branches。一旦我添加了它,它就开始工作了。感谢@FedericoCapaldo

【讨论】:

    猜你喜欢
    • 2020-07-24
    • 2014-03-28
    • 2020-08-17
    • 2015-04-24
    • 2013-02-12
    • 2015-10-05
    • 2012-06-10
    • 2019-05-30
    • 2017-06-08
    相关资源
    最近更新 更多