https://prefect.io logo
Title
j

Jonathan Mathews

04/28/2022, 8:39 AM
Hi, to use Gitlab storage, do I have to provide my personal access token, or can I use a repository specific deploy token? As far as I can see, a personal access token gives read/write access to all of my repositories. Perhaps a project-level access token would work, but I see the docs refer to a personal access token: https://docs.prefect.io/orchestration/flow_config/storage.html#gitlab
k

Kevin Kho

04/28/2022, 9:59 AM
Not sure here. Did you try already and get an error? I could see the project-level token working since it’s just a token. As long as you can make the Gitlab client can take it like this. But Git storage lets you provide the clone url including the token. I think this might work too? Your secret needs to be the full clone url.
j

Jonathan Mathews

04/28/2022, 10:00 AM
Thanks. I haven’t tried the project level yet, but tried the repo-level deploy token and that didn’t work
Ah I see, so potentially I could switch to git instead of gitlab class and just build the url with the token in it?
k

Kevin Kho

04/28/2022, 4:25 PM
Was on a plane to PyCon so couldn’t respond. Yes exactly, that gives the most freedom because now all you need to take there of is supplying that full clone URL
j

Jonathan Mathews

05/06/2022, 8:54 AM
Just for future reference, I tried this but doesn’t seem to be working at the moment: https://prefect-community.slack.com/archives/CL09KU1K7/p1651826601281559
👍 1