Re: SCM Poll fails using pipeline

2016-04-22 Thread Nick Witkowski
Never mind. I had the wrong/invalide credentials string the the git scm 
step.

On Friday, April 22, 2016 at 1:25:11 PM UTC+2, Nick Witkowski wrote:
>
> Hi,
>
> We're running Jenkins ver. 1.609.3 and I have a pipeline job that 
> registers for polling.
>
> Looking at the "Git Polling Log" I see a permission denied error:
>
> Started on Apr 22, 2016 7:06:00 AM
>
> Using strategy: Default
>
> [poll] Last Built Revision: Revision 256109511639dade5d95c561e54fffcc0e263cb0 
> (refs/remotes/origin/work/cascade)
>
>  > git --version # timeout=10
>
>  > git ls-remote -h git@mygithub:ORG/project.git # timeout=10
>
> ERROR: polling failed in 
> /app/jenkins/workspace/project-work-cascade-continuous on ab3-centos7-01
>
> hudson.util.IOException2 
> : 
> hudson.plugins.git.GitException: Command "git ls-remote -h 
> git@mygithub:ORG/project.git" returned status code 128:
>
> stdout: 
>
> stderr: Permission denied (publickey).
>
> fatal: The remote end hung up unexpectedly
>
>   at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:529)
>
>   at 
> org.jenkinsci.plugins.workflow.job.WorkflowJob.poll(WorkflowJob.java:531)
>
>   at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:510)
>
>   at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:539)
>
>   at 
> hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:118)
>
>   at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
>
>   at java.util.concurrent.FutureTask.run(FutureTask.java:262)
>
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>
>   at java.lang.Thread.run(Thread.java:744)
>
> Caused by: hudson.plugins.git.GitException: Command "git ls-remote -h 
> git@mygithub:ORG/project.git" returned status code 128:
>
> stdout: 
>
> stderr: Permission denied (publickey).
>
> fatal: The remote end hung up unexpectedly
>
>   at 
> org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1640)
>
>   at 
> org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1388)
>
>   at 
> org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1282)
>
>   at 
> org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1273)
>
>   at 
> org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getHeadRev(CliGitAPIImpl.java:2376)
>
>   at 
> hudson.plugins.git.GitSCM.compareRemoteRevisionWithImpl(GitSCM.java:583)
>
>   at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:527)
>
>   ... 9 more
>
> Using strategy: Default
>
> [poll] Last Built Revision: Revision 256109511639dade5d95c561e54fffcc0e263cb0 
> (refs/remotes/origin/work/cascade)
>
>  > git --version # timeout=10
>
>  > git ls-remote -h git@mygithub:ORG/project.git # timeout=10
>
>
> Normally on job where the polling succeeds (a non pipeline job) I'd expect 
> the following:
>
> Started on Apr 22, 2016 7:02:00 AM
>
> Using strategy: Default
>
> [poll] Last Built Revision: Revision 9e4a511217a2af22478bf1f3959b449d30587981 
> (refs/remotes/origin/master)
>
> using *GIT_SSH* to set credentials 
>
>  > git --version # timeout=10
>
>  > git ls-remote -h git@mygithub:ORG/project.git # timeout=10
>
> Found 113 remote heads on git@mygithub:ORG/project.git
>
> [poll] Latest remote head revision on refs/heads/master is: 
> 9e4a511217a2af22478bf1f3959b449d30587981 - already built by 398
>
> Done. Took 0.36 sec
>
> No changes
>
>
> The main difference is that the job that succeeds uses GIT_SSH to set the 
> credentials. How do I set the GIT_SSH credentials for a pipeline script so 
> that polling works?
>
> Thanks,
>
> Nick
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/7d3e32f9-f5cd-40c8-bd52-7ab41b2ed5cc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


SCM Poll fails using pipeline

2016-04-22 Thread Nick Witkowski
Hi,

We're running Jenkins ver. 1.609.3 and I have a pipeline job that registers 
for polling.

Looking at the "Git Polling Log" I see a permission denied error:

Started on Apr 22, 2016 7:06:00 AM

Using strategy: Default

[poll] Last Built Revision: Revision 256109511639dade5d95c561e54fffcc0e263cb0 
(refs/remotes/origin/work/cascade)

 > git --version # timeout=10

 > git ls-remote -h git@mygithub:ORG/project.git # timeout=10

ERROR: polling failed in /app/jenkins/workspace/project-work-cascade-continuous 
on ab3-centos7-01

hudson.util.IOException2 
: 
hudson.plugins.git.GitException: Command "git ls-remote -h 
git@mygithub:ORG/project.git" returned status code 128:

stdout: 

stderr: Permission denied (publickey).

fatal: The remote end hung up unexpectedly

at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:529)

at 
org.jenkinsci.plugins.workflow.job.WorkflowJob.poll(WorkflowJob.java:531)

at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:510)

at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:539)

at 
hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:118)

at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)

at java.util.concurrent.FutureTask.run(FutureTask.java:262)

at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

at java.lang.Thread.run(Thread.java:744)

Caused by: hudson.plugins.git.GitException: Command "git ls-remote -h 
git@mygithub:ORG/project.git" returned status code 128:

stdout: 

stderr: Permission denied (publickey).

fatal: The remote end hung up unexpectedly

at 
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1640)

at 
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1388)

at 
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1282)

at 
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1273)

at 
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getHeadRev(CliGitAPIImpl.java:2376)

at 
hudson.plugins.git.GitSCM.compareRemoteRevisionWithImpl(GitSCM.java:583)

at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:527)

... 9 more

Using strategy: Default

[poll] Last Built Revision: Revision 256109511639dade5d95c561e54fffcc0e263cb0 
(refs/remotes/origin/work/cascade)

 > git --version # timeout=10

 > git ls-remote -h git@mygithub:ORG/project.git # timeout=10


Normally on job where the polling succeeds (a non pipeline job) I'd expect 
the following:

Started on Apr 22, 2016 7:02:00 AM

Using strategy: Default

[poll] Last Built Revision: Revision 9e4a511217a2af22478bf1f3959b449d30587981 
(refs/remotes/origin/master)

using *GIT_SSH* to set credentials 

 > git --version # timeout=10

 > git ls-remote -h git@mygithub:ORG/project.git # timeout=10

Found 113 remote heads on git@mygithub:ORG/project.git

[poll] Latest remote head revision on refs/heads/master is: 
9e4a511217a2af22478bf1f3959b449d30587981 - already built by 398

Done. Took 0.36 sec

No changes


The main difference is that the job that succeeds uses GIT_SSH to set the 
credentials. How do I set the GIT_SSH credentials for a pipeline script so 
that polling works?

Thanks,

Nick

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/d3930509-d9cc-407f-ba6e-a67ad39637e7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.