Simple configuration of a git pipeline

370 views
Skip to first unread message

Eric Dolce

unread,
Feb 23, 2016, 11:56:38 AM2/23/16
to go-cd
Hello,

I am really new on gocd and I am trying to setup a simple configuration of a pipeline using my local private git repository ( no GitHub involved ).

So I configured the material using git and the URL below to my local git repo


when I check the connection I got the error


Repository https://user:******@myhostyname.com/repository/.git not found! : 
Error performing command: --- Command ---
git ls-remote https://user:******@myhostyname.com/repository/.git
--- Environment ---
{}
--- INPUT ----


--OUTPUT ---

--- ERROR ---
STDERR: error: couldn't connect to host while accessing https://user:******@myhostyname.com/repository/.git/info/refs
STDERR: 
STDERR: fatal: HTTP request failed
---

Any help will be appreciated.

Thanks
Eric

Ketan Padegaonkar

unread,
Feb 23, 2016, 12:29:17 PM2/23/16
to go-cd
I think the error is very self explanatory. Are you able to run that command locally?

I think your url looks incorrect. should probably be `repository.git` instead of `repository/.git`

--
You received this message because you are subscribed to the Google Groups "go-cd" group.
To unsubscribe from this group and stop receiving emails from it, send an email to go-cd+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Eric Dolce

unread,
Feb 23, 2016, 3:46:40 PM2/23/16
to go-cd
Thanks for your prompt feedback.

The path /etc/chef/repository/.git is correct.

If I use the command manually from a linux prompt it works, the git cmd below works fine

git ls-remote ssh://myhostname/etc/chef/repository/.git

I configured the URL as a ssh protocol using


ssh://myhostname/etc/chef/repository/.git

If I check the connection in the gocd UI this time I got the errors below:

Repository ssh://myhostname/etc/chef/repository/.git not found! : 
Error performing command: --- Command ---
git ls-remote ssh://myhostname/etc/chef/repository/.git
--- Environment ---
{}
--- INPUT ----


--OUTPUT ---

--- ERROR ---
STDERR: PuTTYNG X11 proxy: wrong authorisation protocol attempted
STDERR: (gnome-ssh-askpass:4056): Gtk-WARNING **: cannot open display: localhost:10.0
STDERR: Permission denied, please try again.
STDERR: PuTTYNG X11 proxy: wrong authorisation protocol attempted
STDERR: (gnome-ssh-askpass:4057): Gtk-WARNING **: cannot open display: localhost:10.0
STDERR: Permission denied, please try again.
STDERR: PuTTYNG X11 proxy: wrong authorisation protocol attempted
STDERR: (gnome-ssh-askpass:4058): Gtk-WARNING **: cannot open display: localhost:10.0
STDERR: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
STDERR: fatal: The remote end hung up unexpectedly
---







On Tuesday, February 23, 2016 at 12:29:17 PM UTC-5, Ketan Padegaonkar wrote:
I think the error is very self explanatory. Are you able to run that command locally?

I think your url looks incorrect. should probably be `repository.git` instead of `repository/.git`

On Tue, Feb 23, 2016 at 10:26 PM Eric Dolce <dolce...@gmail.com> wrote:
Hello,

I am really new on gocd and I am trying to setup a simple configuration of a pipeline using my local private git repository ( no GitHub involved ).

So I configured the material using git and the URL below to my local git repo


when I check the connection I got the error


Repository https://user:******@myhostyname.com/repository/.git not found! : 
Error performing command: --- Command ---
git ls-remote https://user:******@myhostyname.com/repository/.git
--- Environment ---
{}
--- INPUT ----


--OUTPUT ---

--- ERROR ---
STDERR: error: couldn't connect to host while accessing https://user:******@myhostyname.com/repository/.git/info/refs
STDERR: 
STDERR: fatal: HTTP request failed
---

Any help will be appreciated.

Thanks
Eric

Mirko Friedenhagen

unread,
Feb 23, 2016, 5:29:00 PM2/23/16
to go...@googlegroups.com

Hello Eric,

to me it looks like your private SSH key is protected with a passphrase and gocd is unable to access a running SSH agent, so git tries to start a gnome ask pass helper which does not work because you have no DISPLAY.

Regards
Mirko
--
Sent from my mobile


when I check the connection I got the error


Repository https://user:******@myhostyname.com/repository/.git not found! : 
Error performing command: --- Command ---
git ls-remote https://user:******@myhostyname.com/repository/.git
--- Environment ---
{}
--- INPUT ----


--OUTPUT ---

--- ERROR ---
STDERR: error: couldn't connect to host while accessing https://user:******@myhostyname.com/repository/.git/info/refs
STDERR: 
STDERR: fatal: HTTP request failed
---

Any help will be appreciated.

Thanks
Eric

--
You received this message because you are subscribed to the Google Groups "go-cd" group.
To unsubscribe from this group and stop receiving emails from it, send an email to go-cd+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Eric Dolce

unread,
Feb 25, 2016, 9:58:10 PM2/25/16
to go-cd
Thanks Mirko, yes that was the problem. I know fixed my ssh authentication I can ssh connect passwordless.

But I still have issues using my git repository, it looks like go is not able to do the first git clone, below is the error. If I clone manually it works fine...

2016-02-25 21:47:13,562 [loopThread] INFO  thoughtworks.go.work.DefaultGoPublisher:95 - Agent [roma.domain.com, 192.168.122.1, de4ba67e-5931-48d2-b30e-5378eaf6fbc8] is reporting status [Preparing] to Go Server for Build [DeployChef/9/defaultStage/1/defaultJob/40]
2016-02-25 21:47:13,704 [loopThread] ERROR thoughtworks.go.work.DefaultGoPublisher:137 - Failed to run git clone command
java.lang.RuntimeException: Failed to run git clone command
        at com.thoughtworks.go.util.ExceptionUtils.bomb(ExceptionUtils.java:36)
        at com.thoughtworks.go.config.materials.git.GitMaterial.updateTo(GitMaterial.java:136)
        at com.thoughtworks.go.domain.MaterialRevision.updateTo(MaterialRevision.java:155)
        at com.thoughtworks.go.domain.materials.AbstractMaterialAgent.prepare(AbstractMaterialAgent.java:41)
        at com.thoughtworks.go.remote.work.BuildWork.prepareJob(BuildWork.java:168)
        at com.thoughtworks.go.remote.work.BuildWork.build(BuildWork.java:136)
        at com.thoughtworks.go.remote.work.BuildWork.doWork(BuildWork.java:91)
        at com.thoughtworks.go.agent.JobRunner.run(JobRunner.java:53)
        at com.thoughtworks.go.agent.AgentController.retrieveWork(AgentController.java:186)
        at com.thoughtworks.go.agent.AgentController.loop(AgentController.java:132)
        at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:273)
        at org.springframework.scheduling.support.MethodInvokingRunnable.run(MethodInvokingRunnable.java:65)
        at org.springframework.scheduling.timer.DelegatingTimerTask.run(DelegatingTimerTask.java:70)
        at java.util.TimerThread.mainLoop(Timer.java:555)
        at java.util.TimerThread.run(Timer.java:505)
Caused by: java.lang.Exception: Failed to run git clone command
        at com.thoughtworks.go.util.ExceptionUtils.bombIfFailedToRunCommandLine(ExceptionUtils.java:50)
        at com.thoughtworks.go.config.materials.git.GitMaterial.git(GitMaterial.java:218)
        at com.thoughtworks.go.config.materials.git.GitMaterial.updateTo(GitMaterial.java:132)
        ... 16 more
2016-02-25 21:47:13,705 [loopThread] INFO  thoughtworks.go.work.DefaultGoPublisher:107 - Agent [roma.domain.com, 192.168.122.1, de4ba67e-5931-48d2-b30e-5378eaf6fbc8] is reporting build result [Failed] to Go Server for Build [DeployChef/9/defaultStage/1/defaultJob/40]
2016-02-25 21:47:13,754 [loopThread] INFO  thoughtworks.go.work.DefaultGoPublisher:90 - Stopping Transmission for Build [DeployChef/9/defaultStage/1/defaultJob/40]

when I check the connection I got the error


Repository https://user:******@myhostyname.com/repository/.git not found! : 
Error performing command: --- Command ---
git ls-remote https://user:******@myhostyname.com/repository/.git
--- Environment ---
{}
--- INPUT ----


--OUTPUT ---

--- ERROR ---
STDERR: error: couldn't connect to host while accessing https://user:******@myhostyname.com/repository/.git/info/refs
STDERR: 
STDERR: fatal: HTTP request failed
---

Any help will be appreciated.

Thanks
Eric

--
You received this message because you are subscribed to the Google Groups "go-cd" group.
To unsubscribe from this group and stop receiving emails from it, send an email to go-cd+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages