Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/github/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jenkins与Github插件集成,用于私有存储库_Github_Jenkins_Jenkins Plugins_Githooks - Fatal编程技术网

Jenkins与Github插件集成,用于私有存储库

Jenkins与Github插件集成,用于私有存储库,github,jenkins,jenkins-plugins,githooks,Github,Jenkins,Jenkins Plugins,Githooks,我已经在Azure虚拟机中安装了Jenkins。 版本-1.651.2 Git的路径: 已安装的插件: 凭据插件-2.0.7 Git Hub凭据插件-0.24 Git Hub插件-1.19.1 SSH凭据插件-1.12 在repo中,Url使用用户名/密码和ssh/私钥尝试了https和ssh,但仍然无法从git服务器中提取 控制台输出: Started by user anonymous Building in workspace C:\Program Files (x86)\Jenki

我已经在Azure虚拟机中安装了Jenkins。 版本-1.651.2

Git的路径:

已安装的插件: 凭据插件-2.0.7 Git Hub凭据插件-0.24 Git Hub插件-1.19.1 SSH凭据插件-1.12

在repo中,Url使用用户名/密码和ssh/私钥尝试了https和ssh,但仍然无法从git服务器中提取

控制台输出:

Started by user anonymous
Building in workspace C:\Program Files (x86)\Jenkins\workspace\Staging Build
[WS-CLEANUP] Deleting project workspace...
[WS-CLEANUP] Done
Cloning the remote Git repository
Cloning repository https://github.com/--/--.git
C:\Program Files\Git\bin\git.exe init C:\Program Files (x86)\Jenkins\workspace\Staging Build # timeout=10
Fetching upstream changes from https://github.com/---/---.git
C:\Program Files\Git\bin\git.exe --version # timeout=10
using GIT_SSH to set credentials 
using .gitcredentials to set credentials
C:\Program Files\Git\bin\git.exe config --local credential.username jenkins # timeout=10
C:\Program Files\Git\bin\git.exe config --local credential.helper store --file=\"C:\Windows\TEMP\git7879671492423343442.credentials\" # timeout=10
C:\Program Files\Git\bin\git.exe -c core.askpass=true fetch --tags --progress https://github.com/---/---.git +refs/heads/*:refs/remotes/origin/* # timeout=2
ERROR: Timeout after 2 minutes
C:\Program Files\Git\bin\git.exe config --local --remove-section credential # timeout=10
ERROR: Error cloning remote repo 'origin'
hudson.plugins.git.GitException: Command "C:\Program Files\Git\bin\git.exe -c core.askpass=true fetch --tags --progress https://github.com/---/---.git +refs/heads/*:refs/remotes/origin/*" returned status code -1:
stdout: 
stderr: 
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1719)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1463)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:63)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:314)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:506)
    at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1057)
    at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1097)
    at hudson.scm.SCM.checkout(SCM.java:485)
    at hudson.model.AbstractProject.checkout(AbstractProject.java:1269)
    at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:607)
    at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
    at hudson.model.Run.execute(Run.java:1738)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    at hudson.model.ResourceController.execute(ResourceController.java:98)
    at hudson.model.Executor.run(Executor.java:410)
ERROR: null
Finished: FAILURE

注: 为了安全起见,我已将我的回购协议名称替换为---并且我已检查URL是否不匹配。 这里出了什么问题

编辑:

我能够使用ssh和https url成功地从gitbash克隆。 在github repo中也添加了部署密钥