Tôi đang cố gắng thiết lập Jenkins trên máy tính Windows Server 2012 và tôi gặp rất nhiều khó khăn.Jenkins treo ở "Tìm nạp thay đổi ngược dòng từ nguồn gốc"
Những điều tôi đã thực hiện:
- Tạo một mật khẩu ít
id_rsa
, vàid_rsa.pub
- Tạo một file
known_hosts
cho bitbucket.org sử dụngssh.exe -T bitbucket.org
và chấp nhận thêm máy chủ. - Thêm
E:
để hệ thống toàn CHỦ Biến - Tôi đã thêm các tập tin để
C:/Windows/SysWOW64/config/systemprofile/.ssh
cũng nhưE:/.ssh
- tôi đã liên kết khóa công khai của tôi để Bitbucket như một chìa khóa triển khai.
- Tôi đã triple-kiểm tra tất cả các URL của tôi, tên người dùng, vv
- Tôi thậm chí bằng tay kéo từ kho lưu trữ để thiết lập một cơ sở ban đầu trong
C:/Program Files (x86)/Jenkins/jobs/MyProject/workspace/
Tuy nhiên nó vẫn bị treo ở
Building in workspace C:\Program Files (x86)\Jenkins\jobs\MyProject\workspace
Checkout:workspace/C:\Program Files (x86)\Jenkins\jobs\MyProject\workspace - [email protected]
Using strategy: Default
Fetching changes from 1 remote Git repository
Fetching upstream changes from origin
Tôi đã cho nó khoảng 20 phút, vì vậy nó không phải là tốc độ/kích thước của vấn đề repo. Nếu tôi hủy, đây là những gì được trả lại:
ERROR: Problem fetching from origin/origin - could be unavailable. Continuing anyway
hudson.plugins.git.GitException: Error performing command: C:\Program Files (x86)\Git\bin\git.exe fetch -t origin +refs/heads/*:refs/remotes/origin/*
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:780)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:739)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.fetch(CliGitAPIImpl.java:160)
at hudson.plugins.git.GitAPI.fetch(GitAPI.java:230)
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:793)
at hudson.plugins.git.GitSCM.access$000(GitSCM.java:57)
at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:976)
at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:942)
at hudson.FilePath.act(FilePath.java:865)
at hudson.FilePath.act(FilePath.java:838)
at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:942)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1101)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1364)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:670)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:575)
at hudson.model.Run.execute(Run.java:1575)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:237)
Caused by: java.lang.InterruptedException
at java.lang.ProcessImpl.waitFor(Native Method)
at hudson.Proc$LocalProc.join(Proc.java:319)
at hudson.Launcher$ProcStarter.join(Launcher.java:360)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:769)
... 19 more
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:981)
at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:942)
at hudson.FilePath.act(FilePath.java:865)
at hudson.FilePath.act(FilePath.java:838)
at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:942)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1101)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1364)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:670)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:575)
at hudson.model.Run.execute(Run.java:1575)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:237)
Tôi đang ở cuối trí thông minh ở đây, vì vậy tôi đánh giá cao tất cả sự trợ giúp tôi có thể nhận được. Dưới đây là một số lựa chọn bài viết mà tôi đã thử không có cải tiến.
Authenticate Jenkins CI for Github private repository
Permission denied (publickey) when setting up Jenkins
Hudson Git Plugin not working on windows
http://computercamp.cdwilson.us/jenkins-git-clone-via-ssh-on-windows-7-x64
Đây có phải là sự cố PATH không? (http://blog.cgdecker.com/2011/02/git-clone-error-on-jenkinshudson-on.html) – VonC
Kiểm tra lại HOME từ trong một phiên bản đang chạy của Jenkins (như trong http: //blog.hlyh .dk/2011/07/debugging-hudson-git-plugin-hanging.html) – VonC
Tôi cũng gặp sự cố này. Điều bực bội là đôi khi nó hoạt động và đôi khi không. Vì vậy, tất cả mọi thứ phải được cấu hình đúng, nhưng nó chỉ là ngẫu nhiên thất bại. –