1. 程式人生 > >Jenkins構建時報錯 ERROR: Error fetching remote repo 'origin' hudson.plugins.git.GitException

Jenkins構建時報錯 ERROR: Error fetching remote repo 'origin' hudson.plugins.git.GitException

                        --昨夜西風凋碧樹,獨上高樓,望盡天涯路

Jenkins + GitLab持續整合時遇到如下錯誤:

ERROR: Error fetching remote repo 'origin'
hudson.plugins.git.GitException: Failed to fetch from ssh://[email protected]:2222/lucy/test.git
	at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:888)
	at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1155)
	at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1186)
	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:120)
	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:90)
	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:77)
	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1$1.call(SynchronousNonBlockingStepExecution.java:50)
	at hudson.security.ACL.impersonate(ACL.java:290)
	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1.run(SynchronousNonBlockingStepExecution.java:47)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: hudson.plugins.git.GitException: Command "git fetch --tags --progress ssh://
[email protected]
:2222/lucy/test.git +refs/heads/*:refs/remotes/origin/*" returned status code 128: stdout: stderr: Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2016) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1735) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:72) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:420) at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:886) ... 13 more

解決方案:

新增Jenkins主機生成的公鑰到GitLab:

在GitLab使用者頭像下拉框下點選Settings,之後在左側邊欄選擇SSH Keys,輸入複製的Key,點選Add Key:

 SSH Key新增成功:

 再次構建:

相關推薦

Jenkins構建時報 ERROR: Error fetching remote repo 'origin' hudson.plugins.git.GitException

                        --昨夜西風凋碧樹,獨上高樓,望盡天涯路 Jenkins + GitLab持續整合時遇到如下錯誤: ERROR: Error fetching remote repo 'origin' hudson.plugins.git.

JenkinsError fetching remote repoorigin‘真正解決辦法

work etc git權限 上大 fetching rep 清理 watermark 部分 Jenkins build時報錯Error fetching remote repo ‘origin‘,網上大部分文章都說是git權限問題,其實並不是,造成這個問題的原因是Jenk

xcodebuild構建時報unknown error -1=ffffffffffffffff Command /bin/sh failed with exit code 1

https build stack com lds turned top ngs targe CI今日構建時報出如下錯誤: /Users/xxx/Library/Developer/Xcode/DerivedData/Snowball-ebllohyukujrncba

jenkins git can't work ERROR: Timeout after 10 minutes ERROR: Error fetching remote repo 'origin'

jenkins之前一直好好的、但是忽然就不能用了 、我就清理了工作空間、然後悲劇的發現、從伺服器上程式碼都拉不下來了、顯示是超時了、但是其他的jenkins任務都好好的、在網上查了很多的方法、但是都不起作用、最後使用jenkins新建任務、然後copy當前的任

解決Jenkinsgit出現的“ERROR: Error fetching remote repo 'origin'”問題

解決 ble after upan 第一時間 building finish als -i 這兩天在搭建Jenkins環境,在構建新job時報ERROR: Error fetching remote repo ‘origin‘,具體錯誤如下: Started by use

MySQL 跨版本主從復制時報ERROR 1794 (HY000): Slave is not configured or failed to initialize properly.

系統 prop enable sha row light server backup properly 背景: zabbix 數據庫遷移,搭建主從,主是5.6.25,從是5.7.15,流式備份應用 redo.log 之後,change master 和reset sl

Linux Xshell連接服務器時報Socket error Event: 32 Error: 10053

connect linux 錯誤提示 連接 soc 沖突 erro ket 輸出內容 問題描述 在用Xshell連接Linux服務器時,出現錯誤提示"Socket error Event: 32 Error: 10053. Connection closing...Sock

使用git提交時報error: RPC failed; HTTP 413 curl 22 The requested URL returned error: 413 Request Entity Too Large

bubuko alt buffer 依然 ads .post oba con 分享圖片 Delta compression using up to 4 threads.Compressing objects: 100% (2364/2364), done.Writing

Myeclipse連線Mysql資料庫時報Error while performing database login with the pro driver:unable

driver template: Mysql connector/j(下拉框進行選擇) driver name: 任意填,最好是資料庫名稱,方便查詢 connection URL: jdbc:mysql://localhost:3306/programmableweb User name: 使用者名稱

laravel migrate時報:Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes

今天在學習laravel的路由模型繫結時,在按照文件執行php artisan migrate時報錯。 In Connection.php line 664: SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was

SpringCloud工作筆記052---SpringCloud打包部署流程_打包時報: BeanCreationNotAllowedException: Error creating bean w

因為都能正確的跑測試方法,所以我也不太注意它,但是有時候閒得蛋疼就會找一下原因。 具體原因我也說不清,直接丟個連線 https://github.com/spring-cloud/spring-cloud-netflix/issues/1952 裡面的一位叫cr

tomcat啟動時報Error creating bean with name 'transactionManager' defined in class path resource

最近寫了一個專案,部署到服務上的時候遇到一個奇葩的問題,一般本地起專案是用jetty玩的,jetty完全正常當部署到tomcat報錯了,找了2天才解決問題,這兩天tomcat問題就像 滿漢全席一樣不重樣。 報錯原文:Error creating bean with name 'transacti

Elipse安裝Pydev等外掛時報An error occurred while collecting items to be installed session context was:(pro

出現問題: 在Elipse安裝外掛的時候,有時候會出現一些錯誤,如下: An error occurred while collecting items to be installed session context was:(profile=epp.package.committers

關於 編譯qt專案時報error: cannot find -lGLESv2 的解決方法

錯誤:        編譯qt專案的時候出現錯誤:error: cannot find -lGLESv2 錯誤產生原因:        無法找到-lGLESv2 ,-l表示庫檔案,根據QT的庫規則,可以

linux php新增pdo_mysql 擴充套件時報 fatal error: ext/mysqlnd/mysqlnd.h: No such file or directory

上一篇是新增mysql報錯,這篇是新增pdo_mysql報錯。 但是,雖然是同樣的錯誤資訊,用上一篇的方法並不行,因為提示說--with-mysql 指令不識別。 試過了網上找的方法,不行。 然後,我就找了一下 ext/mysqlnd/mysqlnd.h 這個檔案,發

android studio 建立動畫時報Error: style attribute '@android:attr/windowExitAnimation' not found的解決辦法

在編寫安卓動畫時,遇到了Error: style attribute '@android:attr/windowExitAnimation' not found的報錯style中的程式碼如下<!-- 進出場動畫都用到的anim style--> <s

Xencenter管理Localstorage執行scan時報Error code: SR_BACKEND_FAILURE_46

通過XenCenter對儲存Localstorage進行'Recan"操作時出錯 : The VDI is not available 通過XenCenter看的錯誤不夠具體,通過xenserver命令: xe sr-scan uuid=儲存UUID 得到如下錯誤: Er

HOG+SVM訓練時報 OpenCV Error: Assertion failed

在HOG+SVM圖片訓練時,經常會看到一種報錯資訊: OpenCV Error: Assertion failed (checkDetectorSize()) in cv::HOGDescriptor::setSVMDetector, file C:\builds\mast

spring boot下使用WebSocket javax時報Error during WebSocket handshake: Unexpected response code: 404

spring boot下使用WebSocket javax時報錯: WebSocket connection to 'ws://l

pipeline構建時報問題解決

home targe pre 修改 bsp ima p s 1.5 取代 問題: 1、No such field found: field java.lang.String sh. Administrators can decide whether to approve