Git checkout failed on slave

345 views
Skip to first unread message

Nati Mirauta

unread,
Oct 2, 2018, 6:30:44 AM10/2/18
to Jenkins Users
Hello,

I have one master node and a slave node I run my Jenkins jobs unto and I encountered a problem recently. I am unable to checkout a repository from Git on my slave through a Jenkins pipeline. Locally, checking out a branch on my repository works fine, cloning, pushing, pulling, everything works. But if I try to do the same operations through a Jenkins pipeline, the stage at which I clone my repo fails with "Could not checkout branch: [branch] with start point [start point]". This is the command I clone my repo with: git branch: '**', credentialsId: '[credential]', url: 'repo_link' . I use a global credential, which makes me think this is not a credential problem, but something else that I am not aware of right now. 

I don't know what to try, I have not found anything on the internet either. Maybe someone here can help me/give me a hint, I'd greatly appreciate as I am a newbie in working with Jenkins.

Have a good day, and thank-you in advance.

Ramanathan Muthaiah

unread,
Oct 15, 2018, 5:01:33 AM10/15/18
to Jenkins Users
I have one master node and a slave node I run my Jenkins jobs unto and I encountered a problem recently. I am unable to checkout a repository from Git on my slave through a Jenkins pipeline. Locally, checking out a branch on my repository works fine, cloning, pushing, pulling, everything works. But if I try to do the same operations through a Jenkins pipeline, the stage at which I clone my repo fails with "Could not checkout branch: [branch] with start point [start point]". This is the command I clone my repo with: git branch: '**', credentialsId: '[credential]', url: 'repo_link' . I use a global credential, which makes me think this is not a credential problem, but something else that I am not aware of right now. 

1) If you can 'ssh to the node', using the same credentials, can you checkout the repo ?

2) In the Git repo, if accessible via Github UI or some form of UI, does the user have necessary privileges to clone ?

3) Remember, when the build happens in the agent node, it runs as a user different from your user id.

/Ram
Reply all
Reply to author
Forward
0 new messages