Clone, Edit, and Push Space Repository From Pipeline
I'm running a pipeline from an agent on a space pipeline, which tests an app, builds a docker image, and deploys it to the registry. Additionally, I aim to have this app deployed on my kubernetes cluster. For this I've adopted a GitOps approach - meaning that I have another repository (hosted by Space as well) where I have all my gitops information, where I aim to basically just change the image tag definition.
So basically, I have app-repo and gitops-repo. The first has a .space.kts file which has the pipeline definition. In it, I want to clone the gitops-repo and do the aforementioned changes. Cloning was possible by configuring the command as such
git -c http.extraheader="Authorization: Bearer ${'$'}JB_SPACE_CLIENT_TOKEN" clone https://git.jetbrains.space/wtvr/wtvr2/gitops-repo.git
I then modify the files, and after adding and committing the changes, at the moment of pushing in a similar fashion I get this error
fatal: could not read Username for 'https://git.jetbrains.space': No such device or address
I tried configuring the git's “user.name” and “user.email” but it didn't help.
So in general… has anyone found a way to push to another space repository from a pipeline which was not the one that triggered the job?
Please sign in to leave a comment.