Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • Jan 31 2019 21:37
    ibnc synchronize #5756
  • Jan 31 2019 20:02
    ibnc synchronize #5756
  • Jan 31 2019 19:07
    arvindsv commented #3304
  • Jan 31 2019 19:06
    arvindsv commented #3304
  • Jan 31 2019 18:59
    varshavaradarajan synchronize #5791
  • Jan 31 2019 18:24
    ibnc synchronize #5756
  • Jan 31 2019 18:11
    mushycode commented #3304
  • Jan 31 2019 17:29
    GaneshSPatil opened #5797
  • Jan 31 2019 15:22
    arvindsv unpinned #5776
  • Jan 31 2019 15:07
    arvindsv commented #3304
  • Jan 31 2019 15:07
    arvindsv commented #3304
  • Jan 31 2019 14:59
    arvindsv commented #5796
  • Jan 31 2019 14:09
    akshaydewan commented #5796
  • Jan 31 2019 13:21
    maheshp commented #5796
  • Jan 31 2019 12:42
    ketan commented #5795
  • Jan 31 2019 12:39
    ketan commented #5795
  • Jan 31 2019 12:38
    JorritSalverda commented #5795
  • Jan 31 2019 12:35
    JorritSalverda commented #5795
  • Jan 31 2019 12:35
    JorritSalverda closed #5795
  • Jan 31 2019 12:00
    mushycode commented #3304
Does anyone know what is going on or whether it's somewhat possible to get gocd running in k8s/ipv6?
Heya! I'm trying to get the current version of go-server running on nixos, with the possible goal of contriubting changes back to the nixos packages. While updating the package for the go-agent was relatively straightforward, the go-server gives me a big long and scary exception that I do not know what to make of. Here is a log of it: https://gist.github.com/skeleten/8cbe11f1a620af4e702abebd62b63c95 I'd really appreciate any points as to whats going wrong here :)
3 replies
Mhm, that would be a problem, considering that the whole reason to update the package was that it was no longer compatible with the shipped jdk version. Thinking of it, the earlier versions gave a much more clear error message about what was going wrong, weird to see that being no longer the case. Thanks for your hint, i'll try to modify the package to use an earlier version (lts maybe) of java, i'll ask again if the problem persist ^-^
Hm, actually this goes against the documentation that says it just needs a version > 13 =/
TJ Broadus
Hello, does anyone have experience with the gocd api. I'm attempting to make a curl request to update EnvironmentVariables for a single pipeline, but the request isnt working.
Hi, does anyone know what I would need to do to get GoCD to access github using personal access tokens?
For Materials
Usually you login with those via https, just use the https url and your username, set the access code as password

@skele10 Correct, however on August 13th GitHub changed what is allowed for logging in and I receive this message now for Materials:

STDERR: remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.
STDERR: remote: Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information.
STDERR: fatal: unable to access 'https://github.com/my-repo': The requested URL returned error: 403

Hello, I try to build test and pack and angular application in 3 separate stages, but it seems that the between each stage the 'node-modules' folder that contains dependent packages is deleted by 'git clean' and I need to add a task to build again on the next stages. Is it possible to keep working directory uncleaned between stages?
@ConFliX: Weird, it seems to work on my instance. Are you positive you've set an personal access token as password? (created on https://github.com/settings/tokens)? Username should be your github username. You also need to set the repo permissions on the token, so it can be used to read the repository
@skele10:matrix.org It actually does work on mine! We found that suggestion this morning! Sorry about that!
No worries Im glad if I was able to help :)
Hey Folks, is there a way to install multiple agents on windows? I tried silent setup but the installer detects existing agent and exists...

Hey Folks, is there a way to install multiple agents on windows? I tried silent setup but the installer detects existing agent and exists...

Install using Generic zip is the answer :) : https://docs.gocd.org/current/installation/install/agent/zip.html

Vignesh Mohanasundaram
Hi. I’m not sure if this is the right forum for it, if not please direct me to right forum.
We are exploring GoCD for our CI/CD pipeline. Currently we are using Bitbucket Pipelines.
I tried locally and have few questions regarding how-to,
  1. Can we configure a pipeline without git dependency / material? We have a pipeline which runs on a schedule and the pipeline is just pure shell script (and it does not depend on any code from any repo).
  2. How to configure multi-branch pipeline? For example, we have an frontend repo with different branch for different environment, like dev, prod, … so that when triggering the pipeline manually, we can select which branch to trigger from.
  3. Here is a complex scenarios which we trying to resolve. We have 2 repo, 1 for frontend and 2 for backend. The backend pipeline will be dependent on frontend pipeline. Whenever the frontend pipeline build is successful, it should trigger backend pipeline. Also if there is any change in backend repo, it should trigger backend pipeline. I’m able to configure this by adding multiple dependencies for backend pipeline. The complexity here is, we generated random key when building frontend (For eg.: KEY=hash-BUILD-1), and the same needs to be passed to backend pipeline.
    a. How to trigger backend pipeline with custom build parameter (KEY)? From pipeline 1 it should pass parameter and value for pipeline 2 build.
    b. How to persist param value (KEY) in backend pipeline, so that subsequent build from backend repo (commits, poll scm) trigger will use the param value (KEY) which is already set. Param value changes only when frontend pipeline creates a new build.
@vigneshraaj For #2, please look at this stackoverflow response: https://stackoverflow.com/a/56811461
Vignesh Mohanasundaram
Thanks @ryan-omni3 I'll try pipeline as code and multiple pipelines with template
Is there any solution for #1 and #3 ?
Aravind SV

For #1: No, you need to have a material. But, it can be a dummy material, with polling turned off. So, it'll only trigger on timer.

For #3: The way to pass information between pipeline instances in usually via artifacts. You'd publish an artifact (can be any file) in the frontend pipeline with that key / param. You can then fetch that artifact from the upstream (frontend) pipeline in the downstream pipeline (backend) and use it. If you ever re-run the backend pipeline instance, it'll get that artifact again and use it. That same version of the artifact. You can verify the versions in the VSM.

Vignesh Mohanasundaram
Thanks @arvindsv for clarifying. One more question,
  1. As part of UAT or Production build, we do git tag and push it through build pipeline script. Is there a way to ignore such commits? Usually we add like [skip] in git commit message and CI/CD pipeline will ignore it. Anything similar in GoCD?
Aravind SV
No, unfortunately nothing like that. It has been brought up before though.
Rafael Karczevski
Good afternoon guys, I'm uploading a server container, and I'm with a permission problem, has anyone had the same problem or know how to solve it?
cp: can't create '/go-working-dir/config/logback-include.xml': Permission denied
Hello team, I need two jobs which are in different stages need to be run in the same go-agent. I am unable to understand where can we configure this. Can someone help me with this?
1 reply
Hello, all.
is there a way to trigger a deploy using only git tags ? how to avoid branch names with gocd?
hey there! what kind of process is required to access private flakes, e.g. in repo's that require access with an ssh key or https auth? e.g. in nixos-rebuild build --flake git+ssh://some.remote/user/flake
Ray Burgemeestre

Hi all, I see someone asked about this in June as well, but in the hope that at some point someone from gocd might read this. Since I updated to the latest gocd version, and did the same for go-agent, I keep hitting:

2021-09-16 08:37:02,448 ERROR [scheduler-2] RemotingClient:166 - Server responded to action `ping` with: status[403 Forbidden], body[]
2021-09-16 08:37:02,449 ERROR [scheduler-2] AgentHTTPClientController:114 - Error occurred when agent tried to ping server: 
java.lang.RuntimeException: org.apache.http.client.ClientProtocolException: The server returned status code 403. Possible reasons include:
   - This agent has been deleted from the configuration
   - This agent is pending approval
   - There is possibly a reverse proxy (or load balancer) that has been misconfigured. See https://docs.gocd.org/21.2.0/installation/configure-reverse-proxy.html#agents-and-reverse-proxies for details.
    at com.thoughtworks.go.agent.RemotingClient.post(RemotingClient.java:118)
    at com.thoughtworks.go.agent.RemotingClient.ping(RemotingClient.java:74)
    at com.thoughtworks.go.agent.AgentHTTPClientController.ping(AgentHTTPClientController.java:109)
    at jdk.internal.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.base/java.lang.reflect.Method.invoke(Unknown Source)
    at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:65)
    at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.base/java.util.concurrent.FutureTask.runAndReset(Unknown Source)
    at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.base/java.lang.Thread.run(Unknown Source)
Caused by: org.apache.http.client.ClientProtocolException: The server returned status code 403. Possible reasons include:
   - This agent has been deleted from the configuration
   - This agent is pending approval
   - There is possibly a reverse proxy (or load balancer) that has been misconfigured. See https://docs.gocd.org/21.2.0/installation/configure-reverse-proxy.html#agents-and-reverse-proxies for details.
    at com.thoughtworks.go.agent.RemotingClient.validateResponse(RemotingClient.java:141)
    at com.thoughtworks.go.agent.RemotingClient.post(RemotingClient.java:114)
    ... 13 common frames omitted

I deployed the latest helm chart, and I've tried an existing go-agent, as well as using the provided go agent daemonset. Both hit this same error. I configured my k8s instance with valid ssl certificates etc., so the suggestions w/r/t reverse proxies doesn't seem to make sense.

Ray Burgemeestre
I might have found a hint in the server Pod. I'm not using elastic agents (have in the past) but seems it's failing executing some k8s commands. (io.fabric8.kubernetes.client.KubernetesClientException: Operation: [list] for kind: [Pod] with name: [null] in namespace: [gocd] failed.) Will post an update if I manage to fix it..
Ray Burgemeestre
Going inside the pod, and running the kubectl executable I can verify that Im able to do kubectl get pods -n gocd, stracing the server process I also don't see any failed connection attempt, even though in the logs it says that this exception is due to a connection time out
1 reply
Ray Burgemeestre
Turns out the k8s error was unrelated, got rid of some unused elastic agent stuff and that part is gone. Just happened to show up in the logs around the same time..
Ray Burgemeestre
Sigh, so many days I've spent on this stuff first when updating to a newer version with this db migration stuff, and now every time I solve an error I get a new one. I got rid of all the elastic agent stuff, and I get this in my logs:
jvm 1 | 2021-09-16 17:15:08,016 WARN [Thread-78] PluginSettingsMetadataLoader:63 - Failed to fetch plugin settings metadata for plugin cd.go.contrib.elasticagent.kubernetes. Maybe the plugin does not implement plugin settings and view? + huge stack trace of course, and I no longer see any of the failed remote agent "ping" requests, even though the agents keep printing they get 403's
Ray Burgemeestre
I see the 403's in the requestlog, but that's all the info I get unfortunately. No idea why it returns this status code
jvm 1 | 2021-09-17 08:03:55,172 INFO [qtp1374887279-28] RequestLog:28 - - - [17/Sep/2021:08:03:55 +0000] "POST /go/remoting/api/agent/ping HTTP/1.1" 403 0 1
jvm 1 | 2021-09-17 08:04:00,182 INFO [qtp1374887279-29] RequestLog:28 - - - [17/Sep/2021:08:04:00 +0000] "POST /go/remoting/api/agent/ping HTTP/1.1" 403 0 1
Ray Burgemeestre
Some extra info using strace
[pid 2927458] 1631866185.681554 <... read resumed>"POST /go/remoting/api/agent/ping HTTP/1.1\r\nHost: ***\r\nX-Request-ID: d537cf703cb517a52982aa86744f7083\r\nX-Real-IP:\r\nX-Forwarded-For:\r\nX-Forwarded-Host: ***\r\nX-Forwarded-Port: 443\r\nX-Forwarded-Proto: https\r\nX-Scheme: https\r\nContent-Length: 428\r\nAccept: application/vnd.go.cd+json\r\nX-Agent-GUID: 3f2771f3-1fd2-4093-a896-4bba33ae9ca2\r\nAuthorization: c2lyAYi0TfYXcaKuEd80oCjhoam9f3vEwm3zySsTrPE=\r\nContent-Type: application/json; charset=UTF-8\r\nUser-Agent: Apache-HttpClient/4.5.13 ("..., 8192) = 1047
[pid 2927458] 1631866185.683503 writev(421, [{iov_base="HTTP/1.1 403 Forbidden\r\nDate: Fri, 17 Sep 2021 08:09:45 GMT\r\nX-XSS-Protection: 1; mode=block\r\nX-Content-Type-Options: nosniff\r\nX-Frame-Options: SAMEORIGIN\r\nX-UA-Compatible: chrome=1\r\nContent-Length: 0\r\n\r\n", iov_len=204}], 1 <unfinished ...>
[pid 2927458] 1631866185.684559 write(48, "2021-09-17 08:09:45,684 INFO  [qtp1374887279-40] RequestLog:28 - - - [17/Sep/2021:08:09:45 +0000] \"POST /go/remoting/api/agent/ping HTTP/1.1\" 403 0  3\n", 161 <unfinished ...>
[pid 2927458] 1631866185.685155 write(1, "2021-09-17 08:09:45,684 INFO  [qtp1374887279-40] RequestLog:28 - - - [17/Sep/2021:08:09:45 +0000] \"POST /go/remoting/api/agent/ping HTTP/1.1\" 403 0  3\n", 161 <unfinished ...>
Ray Burgemeestre
Turns out a completely new box I am able to connect an agent. I suppose updating the go-agent (existing) package can cause issues (I had even tried stuff like sudo apt install --reinstall -o Dpkg::Options::="--force-confask,confnew,confmiss") , and the helm provided agent deployment is also not working. at least I got something working now. If someone finds this on google perhaps they will find it useful, if you've updated. Best just purge the existing agents completely, don't try to update them, and don't try to use the agents that are prepared by helm.
Albin Joseph

I am trying to configure go cd behind nginx reverse proxy. I followed the documentation, but when I access gocd using url domain.com/go, its giving a 404 page (the browser url now is /go/pipelines) . My nginx config file is

location /go/ {
    proxy_set_header        Host            $host;
    proxy_set_header        X-Real-IP       $remote_addr;
    proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header        X-Forwarded-Proto $scheme;
    proxy_http_version      1.1;

    proxy_pass http://localhost:8153/go;

    client_max_body_size  10000m;

Is there any other changes I need to do to make this working?

3 replies
Saurabh Shrivastava

Hey everybody! I am quite new to GoCD, love it so far! I had a question about webhooks. Can somebody point me to the documentation to the feature this PR introduced gocd/gocd#8023 ?

More specifically, I am looking for the payload config_repo webhook is expecting. Basically, my code is hosted on codecommit (not on GitHub/BitBucket etc). So my plan was to intercept codecommit trigger, convert it into one of the expected payloads to trigger webhook.

I was able to get it to work mostly, but I encountered an issue. Looks like GoCD only triggers the pipeline for branch configured in Config Repo. So, I was planning to mask the branch and convert it to whichever is configured before sending the payload. If I can get what payload GoCD is expecting, maybe I could get it to refresh the material for other branches too?

Saurabh Shrivastava
I just played with notify-materials API (https://api.gocd.org/current/#notify-materials), it appears to be fitting better for my use case.

Hi everyone!
We recently deployed GoCD in our Kubernetes cluster (using gocd helm chart), one server + 3 agents
There's an issue when I try to run a test pipeline that only runs a simple command. It fails without printing any output that'd help me figure out what's happening

[go] Start to prepare test-0/1/test/1/test on revo-gocd-agent-59c54bcd68-bt5q7 [/go]
[go] Start to build test-0/1/test/1/test on revo-gocd-agent-59c54bcd68-bt5q7 [/go]
[go] Task: env     took: 0.1s
[go] Task status: failed, took: 0.1s
[go] Current job status: failed

I tried to run it in a couple of different ways, like /bin/bash -c hostname or using git|pluggable scm materials, but had no success in making in work
Can you please help me understand what I did wrong?
The pipeline is configured as below:

format_version: 10
    group: testGroup
    label_template: ${COUNT}
    lock_behavior: none
    display_order: -1
        scm: my-material
    - test:
        fetch_materials: true
        keep_artifacts: false
        clean_workspace: false
          type: success
          allow_only_on_success: false
            timeout: 0
            - exec:
                command: env
                run_if: passed

Any help would be much appreciated

Cristian Chiru
@rami-abu It seems to be because of copied encrypted values in some env vars from a previous config.xml. Settings the secrets again seems to resolve the issue. However, is it weird that no errors are generated when trying to decrypt the values, instead just the command fails.
Thank you @cristichiru
Yes, an error message would've helped a lot with the investigation


I am looking to move from h2 -> PostgreSQL database. There is very little information on PostgreSQL around licensing, costs, support. I have tried emailing thoughworks but have received no response. Can anyone help? Thanks

2 replies
Eric Low

we are seeing issues with our agents.
we are seeing this error frequently, and I'm not sure how to proceed. This host was restarted 30 minutes before:
```Error performing command: --- Command ---
git rev-parse --abbrev-ref HEAD
--- Environment ---
--- INPUT ----

--- EXIT CODE (128) ---

STDERR: fatal: Not a git repository (or any of the parent directories): .git

Is there a more detailed log I can look at to see what is going on and what I might be able to do next?
Hi, I've configured a role with view only access on a specific env. I assigned this role to a user. Problem : this user does not see any pipelines. On the "role" page, there is a message saying "None of the installed plugin supports role based authorization." I'm using password file authentication. Is there a way to use roles in combination with password files ?
Hello folks, good day. I am trying to setup gocd with elastic agents on a kubernetes cluster, the agents are not coming up

Error on the server
jvm 1 | Caused by: java.security.cert.CertificateException: Could not parse certificate: java.io.IOException: Empty input
jvm 1 | at java.base/sun.security.provider.X509Factory.engineGenerateCertificate(Unknown Source)
jvm 1 | at java.base/java.security.cert.CertificateFactory.generateCertificate(Unknown Source)
jvm 1 | at io.fabric8.kubernetes.client.internal.CertUtils.createTrustStore(CertUtils.java:101)
jvm 1 | at io.fabric8.kubernetes.client.internal.CertUtils.createTrustStore(CertUtils.java:79)
jvm 1 | at io.fabric8.kubernetes.client.internal.SSLUtils.trustManagers(SSLUtils.java:115)
jvm 1 | at io.fabric8.kubernetes.client.internal.SSLUtils.trustManagers(SSLUtils.java:94)
jvm 1 | at io.fabric8.kubernetes.client.utils.HttpClientUtils.createHttpClient(HttpClientUtils.java:82)
jvm 1 | ... 23 common frames omitted
jvm 1 | Caused by: java.io.IOException: Empty input
jvm 1 | ... 30 common frames omitted
jvm 1 | 2021-10-29 05:52:44,389 ERROR [159@MessageListener for CreateAgentListener] JMSMessageListenerAdapter:87 - Exception thrown in message handling by listener com.thoughtworks.go.server.messaging.elasticagents.CreateAgentListener@270e222e
jvm 1 | java.lang.RuntimeException: The plugin sent a response that could not be understood by Go. Plugin returned with code '500' and the following response: 'Failed to handle request cd.go.elastic-agent.create-agent'

Has anyone else faced this issue before, if yes how to solve this.
How to specify MySQL using docker-compose,Do you have a docker-compose exemple?
Hello folks, is it possible to pass a variable declared in 'Environments' as the value of variable declared in environment variables section of a job?