在我们的组织中,我们有本地托管的git。对于我的项目,我需要在jenkins的帮助下实现CI。我知道用GitHub配置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,但当我输入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中提供什么吗?
发布于 2017-06-20 09:01:50
简单:当给定别名时,ssh将查找%HOME%/.ssg/config。
就像"config",而不是"conf“。
确保定义了HOME (对C:\Users\AY)。并且您的ssh配置文件名为"config“。
还测试ssh -i C:\Users\AY\.ssh\anish -T gitolite@10.47.52.185是否工作。
我使用了ubuntu的
gitolite.pub,我在windows中创建了anish.pub,并将其添加到gitolite中,并更改了conf/gitolite.conf,如下所示
gitolite-admin RW+ = gitolite
repo testing
RW+ = @all
repo bigfastblog
RW+ = anish 确保将该gitolite.conf推回Ubuntu服务器,并检查~gitolite/.ssh/authorized_keys确实列出了anish.pub内容。
另外,HOME/.ssh应该包括anish.pub和anish (私钥)
最后能够克隆:这是
HOME环境变量的问题。
https://stackoverflow.com/questions/44647694
复制相似问题