【问题标题】:Buildbot GitPoller - how to configure GitPoller with passwordBuildbot GitPoller - 如何使用密码配置 GitPoller
【发布时间】:2015-09-08 07:03:56
【问题描述】:

我以前从未将 GitPoller 与 buildbot 一起使用,但我想将其合并。 所以我有一个使用用户名和密码访问的存储库,所以当我克隆它时,我使用:https://username@host.com/path/to/repo.git 当我尝试拉取或推送时,它会要求我输入密码。所以我认为我的问题在于身份验证部分。

repourl我尝试使用: username@host.com https://username@host.com https://username@host.com/path/to/repo.git https://username:password@host.com/path/to/repo.git 但它们都不起作用。我总是得到以下回复:

2015-09-08 16:42:13+1000 [-] while polling for changes
    Traceback (most recent call last):
      File "C:\Python27\lib\site-packages\buildbot\util\misc.py", line 54, in start
        d = self.method()
      File "C:\Python27\lib\site-packages\buildbot\changes\base.py", line 70, in doPoll
        d = defer.maybeDeferred(self.poll)
      File "C:\Python27\lib\site-packages\twisted\internet\defer.py", line 150, in maybeDeferred
        result = f(*args, **kw)
      File "C:\Python27\lib\site-packages\twisted\internet\defer.py", line 1274, in unwindGenerator
        return _inlineCallbacks(None, gen, Deferred())
    --- <exception caught here> ---
      File "C:\Python27\lib\site-packages\twisted\internet\defer.py", line 1128, in _inlineCallbacks
        result = g.send(result)
      File "C:\Python27\lib\site-packages\buildbot\changes\gitpoller.py", line 147, in poll
        yield self._dovccmd('init', ['--bare', self.workdir])
      File "C:\Python27\lib\site-packages\buildbot\changes\gitpoller.py", line 299, in _dovccmd
        [command] + args, path=path, env=os.environ)
      File "C:\Python27\lib\site-packages\twisted\internet\utils.py", line 174, in getProcessOutputAndValue
        reactor)
      File "C:\Python27\lib\site-packages\twisted\internet\utils.py", line 28, in _callProtocolWithDeferred
        reactor.spawnProcess(p, executable, (executable,)+tuple(args), env, path)
      File "C:\Python27\lib\site-packages\twisted\internet\posixbase.py", line 353, in spawnProcess
        return Process(self, processProtocol, executable, args, env, path)
      File "C:\Python27\lib\site-packages\twisted\internet\_dumbwin32proc.py", line 195, in __init__
        raise OSError(pwte)
    exceptions.OSError: (2, 'CreateProcess', 'The system cannot find the file specified.')

计算机已配置 git 和连接,当我从命令行拉出时可以工作。有关如何解决此问题的任何建议?

【问题讨论】:

  • 这看起来比密码更重要。看起来在搜索 PATH 环境变量的 shell 中找不到您的 git 二进制文件。

标签: git buildbot


【解决方案1】:

@DavidDean 是对的。 Buildbot 无法从 PATH 中使用 git,即使它已在机器上正确配置,但添加 git bin 作为 git poller 的参数解决了该问题。

【讨论】:

    【解决方案2】:

    您可以通过在 Windows slave %PATH% system em> 环境变量。

    如果您的主服务器配置了 Windows + Linux 从服务器,则主服务器上的自定义 gitPoller gitbin 变量可能会出现问题。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-11-17
      • 1970-01-01
      相关资源
      最近更新 更多