Buildbot GitPoller - 如何使用密码配置 GitPoller
Buildbot GitPoller - how to configure GitPoller with password
我以前从未将 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
但其中 none 有效。我总是收到以下回复:
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 并配置了连接,当我从命令行拉出时可以正常工作。关于如何解决这个问题有什么建议吗?
@DavidDean 是对的。 Buildbot 无法使用 PATH 中的 git,即使它已在机器上正确配置,但添加 git bin 作为 git poller 的参数解决了这个问题。
您可以通过设置 Git bin 路径 (C:\Program files\Git\bin 来避免 GitPoller gitbin 修改) 在你的 Windows slave %PATH% system 环境变量中。
自定义 gitPoller gitbin 如果您的主机配置了 Windows + Linux 个从机,则主机上的变量可能有问题。
我以前从未将 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
但其中 none 有效。我总是收到以下回复:
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 并配置了连接,当我从命令行拉出时可以正常工作。关于如何解决这个问题有什么建议吗?
@DavidDean 是对的。 Buildbot 无法使用 PATH 中的 git,即使它已在机器上正确配置,但添加 git bin 作为 git poller 的参数解决了这个问题。
您可以通过设置 Git bin 路径 (C:\Program files\Git\bin 来避免 GitPoller gitbin 修改) 在你的 Windows slave %PATH% system 环境变量中。
自定义 gitPoller gitbin 如果您的主机配置了 Windows + Linux 个从机,则主机上的变量可能有问题。