我之前从未使用过GitPoller和buildbot,但我想把它包含在内。
所以我有一个使用用户名和密码访问的repo,所以当我克隆它时,我使用: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和连接,当我从命令行拉出时可以正常工作。关于如何解决这个问题的任何建议?
答案 0 :(得分:1)
@DavidDean是对的。 Buildbot无法使用PATH中的git,即使它已在机器上正确配置,但添加git bin作为git poller的参数修复了该问题。
答案 1 :(得分:0)
您可以通过在Windows slave%PATH%系统中设置Git bin路径(C:\ Program files \ Git \ bin)来避免buildbot主配置中的GitPoller gitbin 修改环境变量。
如果您的主服务器配置了Windows + Linux从服务器,则主服务器上的自定义gitPoller gitbin 变量可能会出现问题。