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‘
- error: remote origin already exists. [How to Solve]
- error: remote origin already exists [How to Solve]
- Git push Submit to Remote Error: “remote: Support for password authentication was removed on August 13, 2021.“
- [Solved] Remote URL test failed: Could not read from remote repository.
- Kafka Error while fetching metadata with correlation id 1 : {alarmHis=LEADER_NOT_AVAILABLE}
- [Solved] BLAST Database error: Error pre-fetching sequence data
- kafka Error: Error while fetching metadata with correlation
- [Solved] pod CDN: trunk Repo update failed – 56 error(s):
- [Solved] FlutterIOS CDN trunk Repo update failed – 34 error(s)
- Repo init Error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed
- [Solved] CentOS 6 yum update Error: Cannot find a valid baseurl for repo: base
- [Solved] Access to XMLHttpRequest at ‘http://127.0.0.1:5000/markdownlang/‘ from origin ‘null‘ has been bl
- [GO]Solve request origin not allowed by Upgrader.CheckOrigin websocket cross-domain
- [Solved] Mac Install homebrew Error: error: Not a valid ref: refs/remotes/origin/master
- [Solved] dockerfile Build Image Error: Error: Failed to download metadata for repo ‘appstream’…
- [Solved] Error: Failed to download metadata for repo ‘docker-ce-stable‘: Cannot download repomd.xml:
- Git pull and Git pull origin master Warning: Pulling without specifying how to reconcile divergent branches
- [Solved] PostgreSQL Remote Access Error: could not connect to server
- How to Solve Maven Error: Failure to transfer com.thoughtworks.xstream:xstream:jar:1.3.1 from https://repo.maven.ap