Hi prefect team, I'm having this issue with a depl...
# prefect-cloud
r
Hi prefect team, I'm having this issue with a deployment that should take my code from gitlab and run it on a cloud run:push type of job. My issue is that the git authentication doesn't succeed no matter what I try, with the error being
RuntimeError: Failed to clone repository '<https://gitlab.xxx.com/private_repo.git>' with exit code 128.
. I have tried to give the access token as a secret block and as well as a gitlab credentials block and both of them encounter the same error. My current configuration looks like this:
Copy code
[
  {
    "prefect.deployments.steps.git_clone": {
      "branch": "dev",
      "repository": "<https://gitlab.xxx.com/private_repo.git>",
      "access_token": "{{ prefect.blocks.secret.deployment-private-repo }}"
    }
  }
]
I've seen a simmilar issue, but for github where the resolution was to have the access token stored as a secret and not a github credentials block, but in gitlab's case doesn't work. Another thing that I tried was to set up a subprocess work pool, and in this case, when the cloning starts, git credentials manager pops up with the access token as username. Is there any way to make this headless?
m
Hey, did you make any progress on this? I am facing the same issue. It seems to me that the GitlabCredential token which is a Pydantic SecretStr isn’t being resolved before the command is run.
s
I am having the same issue with Github ☝️
m
r
We switched our codebase to github until it's solved. I've seen an open issue on github related to this, apparently they need to adapt their code for gitlab new auth method https://github.com/PrefectHQ/prefect/issues/10832
m
@Răzvan Vîlceanu are you using a personal access token or a deploy token?
r
personal access token