Pipeline 'checkout scm' doing twice the job?

147 views
Skip to first unread message

Grégory Lureau

unread,
Nov 10, 2016, 11:49:55 AM11/10/16
to Jenkins Users
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

[Pipeline] checkout
Cloning the remote Git repository
Cloning repository https://github.com/<...>.git
 > /usr/bin/git init /var/lib/jenkins/workspace/<...> # timeout=10
Fetching upstream changes from https://github.com/<...>.git
 > /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 remote.origin.url https://github.com/<...>.git # timeout=10
 > /usr/bin/git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10
 > /usr/bin/git config remote.origin.url https://github.com/<...>.git # timeout=10
Fetching upstream changes from https://github.com/<...>.git
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 remote.origin1.url https://github.com/<...>.git # timeout=10
Fetching upstream changes from https://github.com/<...>.git
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.
Reply all
Reply to author
Forward
0 new messages