在我们的组织中,我们有本地托管的git。而对于我的项目,我需要在詹金斯的帮助下实施CI。我知道用GitHub配置jenkins,但不知道用本地git配置它。配置Jenkins的本地git
在Repository URL
我应该提供什么?
在我的仓库运行git remote show origin
命令后,我得到了类似下面
WARNING: previous mirror push of repo 'OPT' to host 'tregit1' failed, status is:
2017-06-16.19:28:39 31417 ssh: connect to host 10.9.100.31 port 22: No route to host
2017-06-16.19:28:39 31417 fatal: Could not read from remote repository.
2017-06-16.19:28:39 31417
2017-06-16.19:28:39 31417 Please make sure you have the correct access rights
2017-06-16.19:28:39 31417 and the repository exists.
----------
* remote origin
Fetch URL: gitbox:OPT
Push URL: gitbox:OPT
HEAD branch: master
Remote branch:
master tracked
Local branch configured for 'git pull':
master merges with remote master
Local ref configured for 'git push':
master pushes to master (up to date)
,并运行此git remote -v
命令的输出像
origin gitbox:OPT (fetch)
origin gitbox:OPT (push)
我试着给Repository URL
为gitbox:OPT
但Jenkins在输入时出现以下错误gitbox:OPT
Failed to connect to repository : Command "git ls-remote -h gitbox:OPT HEAD"
returned status code 128:
stdout:
stderr: ssh: Could not resolve hostname gitbox: Temporary failure in name resolution
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
和存储库存在。
任何人都可以告诉我在Git URL中提供什么?
尝试提供具有以下格式的网址:'git @ hostname:repo_name.git',并在此之前,确保配置git凭证(通过凭证插件) –