Hi guys,
I'm start to use Jenkins Pipeline and my own is pretty simple for now and it's just using a simple checkout:
stage('checkout') {
checkout scm
}
But in the logs I got
Cloning the remote Git repository
> /usr/bin/git init /var/lib/jenkins/workspace/<...> # timeout=10
> /usr/bin/git --version # timeout=10
using GIT_ASKPASS to set credentials
> /usr/bin/git fetch --tags --progress https://github.com/<...>.git +refs/heads/*:refs/remotes/origin/* > /usr/bin/git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10
using GIT_ASKPASS to set credentials
> /usr/bin/git fetch --tags --progress https://github.com/<...>.git +refs/heads/*:refs/remotes/origin/* using GIT_ASKPASS to set credentials
> /usr/bin/git fetch --tags --progress https://github.com/<...>.git +refs/pull/*/head:refs/remotes/origin/pr/* Checking out Revision <commit> (<branch_name>)
> /usr/bin/git config core.sparsecheckout # timeout=10
> /usr/bin/git checkout -f <commit>
I've the feeling that the second part (purple) is a duplication of the first (in blue) and is just creating a second remote for nothing.
Is there any explanation for that? It looks like a bug to me :/
Also a more general question: Why is it using https by default? (I'd prefer ssh to be honest.)
Best Regards,
Greg
PS: I'm using the organization scan to detect the Jenkinsfile.