Hi I’m a newbie,
Running a Jenkins controller/agent lab on Kubernetes. K8s and Git plugin installed.
I want to clone a Git repo, store it in a shared folder on K8, then Kaniko will use it to build a image.
Already tried to clone it from the Jenkins Agent and even from Kaniko container, but neither of them have Git installed. How am I suppose to do it? Sure I’m missing something… Any idea is appreciated.
Result:
Running on Jenkins in /var/jenkins_home/workspace/CloningGit
[Pipeline] {
[Pipeline] stage
[Pipeline] { (Clone Git)
[Pipeline] git
The recommended git tool is: NONE
using credential git_credentials
git rev-parse --resolve-git-dir /var/jenkins_home/workspace/CloningGit/.git # timeout=10
Fetching changes from the remote Git repository
git config remote.origin.url /leosalcie/pythonapp.git # timeout=10
Fetching upstream changes from /leosalcie/pythonapp.git
git --version # timeout=10
git --version # ‘git version 2.30.2’
using GIT_ASKPASS to set credentials Credenciales de Git
git fetch --tags --force --progress – /leosalcie/pythonapp.git +refs/heads/:refs/remotes/origin/ # timeout=10
ERROR: Error fetching remote repo ‘origin’
worked just fine (though I removed credentialsId as I don’t have credentials named git_credentials. MAybe your having some sort of proxy or lack of proxy issue.