explain:
During the work, Jenkins made such a mistake in pulling gitlab as below:
jenkenis ERROR: Error fetching remote repo ‘origin‘
The pipeline command is as follows:
pipeline {
agent any
options {
timeout(time: 2, unit: 'HOURS')
}
stages {
stage('Fetch code') {
steps {
echo 'Hello World'
checkout([$class: 'GitSCM', branches: [[name: '*/master']],
doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'CloneOption', depth: 1, noTags: true, reference: '', shallow: true, timeout: 120]],
submoduleCfg: [],userRemoteConfigs: [[credentialsId: '49352c9d-3f03-4271-8b60-2fddab3ca058', url:
'[email protected]']]])
}
}
}
}
Solution:
cd to the specified directory under the corresponding workspace, such as workspace\test_pipelinescript here, and manually clone the project to the local through git clone. It should be noted here:
1. Delete the .git folder in the test_pipelinescript directory;
2. Copy everything in the test_jenkins directory to test_pipelinescript
3. Restart Jenkins service.
Enter services.msc through Win + R, find Jenkins service and stop –> Start
4. Re-trigger Jenkins to execute again, and it’s OK.
Read More:
- [Solved] Jenkins-ERROR: Error cloning remote repo ‘origin‘
- [Solved] jenkins-deleteDir Error (FilePath is missing)
- Jenkins Error: code=exited, status=127 [How to Solve]
- [Solved] pod Error: back off restarting failed container
- [Solved] allure Error: unrecognized arguments: — alluredir — clean alluredir
- [Solved] Error: SRC refspec master doors not match any
- R language Use setwd() function Error [How to Solve]
- [Solved] Git Clone Error: The TLS connection was non-properly terminated.
- How to Solve Docker ERROR: Service’workspace’ failed to build: ERROR: Service’php-fpm’ failed to build
- Nexus3 builds Jenkins error: Not authorized (Downloading dependent jar package error)
- Xcode12.5 package framework error [How to Solve]
- [Solved] Doris StreamLoad Error: load by MERGE or DELETE need to upgrade table to support batch delete
- [Solved] Git Clone Error: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
- No repositories directory found inside registry_ DATA_ DIR
- [Solved] HTTP Error 400. The request hostname is invalid.
- Gitlab Clone Error: next InitializeSecurityContext failed
- Git push Submit to Remote Error: “remote: Support for password authentication was removed on August 13, 2021.“
- [Solved] fatal: could not read Username for
- How to Solve golang test Error: # command-line-arguments [command-line-arguments.test]
- Using Jenkins to compile APK Error [How to Solve]