在我們的組織中,我們有本地託管的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憑證(通過憑證插件) –