我希望Jenkins能够从我在Github上托管的私有存储库中自动获取数据.但我不知道如何完成这项任务.试过文档,为jenkins用户生成ssh-key,所有我能看到的是:"无法克隆回购".我检查了网址 - 它们是有效的.
任何线索,也许你知道一些文档/博客/什么描述这种东西?
我们在Windows Server 2012上的Jenkins安装上遇到了缓慢的git fetch命令.我已经尝试了这些线程中提到的所有解决方案:
Hudson git命令*令人难以置信*慢(使用PuTTY中的plink.exe并设置GIT_SSH使用它)
Jenkins挂在"从原点获取上游更改"(更改Jenkins以使用cmd\git.exe而不是bin\git.exe)
任何人都可以通过永久修复找到解决方案吗?
Jenkins的控制台输出日志:
由远程主机启动
在工作区F:\ Jenkins\jobs\xxx\workspace中构建主服务器
> git.exe rev-parse --is-inside-work-tree #timeout = 10
从远程Git存储库中获取更改
> git.exe config remote.origin.url xhttp:// scm/git/xxx #timeout = 10
从xhttp:// scm/git/xxx获取上游更改
> git.exe --version #timeout = 10
使用.gitcredentials设置凭据
> git.exe config --local credential.helper store --file = \"C:\ Users\APP_JE~1\AppData\Local\Temp\git7476037793811743133.credentials \"#timeout = 10
> git.exe -c core.askpass = true fetch --tags --progress xhttp:// scm/git/xxx + refs/heads/:refs/remotes/origin /
问题在这里:上述命令可能需要30秒到120秒.在本地开发机器上需要几秒钟.
> git.exe config --local --remove-section credential #timetime = 10
版本信息:
詹金斯:1.608(最新) …
我在Win 2008服务器计算机上设置Jenkins,并且在配置Jenkins以连接到GitHub时遇到一些麻烦.我收到以下错误:
Command "git.exe fetch -t git@github.com:USER/REPO.git +refs/heads/*:refs/remotes/origin/*" returned status code 128: Permission denied (publickey).
fatal: The remote end hung up unexpectedly
ERROR: Could not fetch from any repository
FATAL: Could not fetch from any repository
hudson.plugins.git.GitException: Could not fetch from any repository
at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:950)
at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:908)
at hudson.FilePath.act(FilePath.java:758)
at hudson.FilePath.act(FilePath.java:740)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:908)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1184)
at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:537)
at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:425)
at hudson.model.Run.run(Run.java:1376)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:175)
Run Code Online (Sandbox Code Playgroud)
我检查过的事情
Jenkins配置设置
msysgit工作,但CMD提示不会 当我导航到有效的仓库并从DOS提示符执行命令时,它也会失败. …
我安装了带有OpenSSH选项的msysgit.在Git bash中,我可以运行ssh-agent,它管理我的ssh密钥的密码.Hudson Git插件是否可以使用ssh-agent?目前,它在尝试克隆时挂起,无疑等待输入密码.
谢谢!