Exporting to Gitlab suddenly not working anymore

Recently I’ve added an integration to one of our projects to export all secrets to Gitlab CI variables. It worked for a couple days but all of a sudden it’s not working anymore and any attempt to re-enable the integration fails with a 400 error. I’ve checked/rotated the access token multiple times but for some reason they keep failing now.

Is there any thing I can do to see the actual response from the Gitlab API to troubleshoot, or any other steps I can take to solve this? Thanks!

Hi @Leander!

Welcome to the Doppler Community!

Typically, a 400 like this means that some value in one of your secrets is causing a problem on GitLab’s side when we try syncing it. Did you make any secret value changes around the time it stopped working? If you did, can you try reverting that change and see if the sync starts working again? If it does, could you let me know what the change was that caused this? I’ll see if I can reproduce it then and see if there’s a specific error or condition that GitLab is failing on that we can handle better!


Hi @watsonian,

Thanks a lot for the response, I’ve spent some time debugging and unfortunately didn’t find a cause yet. I suspect the issue is actually with syncing the variables from Gitlab into Doppler. To test I’ve created a new project without any secrets in it, and set up the Gitlab integration with sync settings set to “Import, preferring Gitlab”. Unfortunately no secrets are being synced from Gitlab to Doppler, the other way around also doesn’t work. Both methods fail with “400 (Unknown error)”.

I’ve checked all the secret values in Gitlab to make sure there are no weirdly formatted values. Pretty much all of them are alphanumeric strings and some 0/1 values. So I’m kind of at a loss here.

@Leander Out of curiosity – do you use any variable references in your GitLab secrets?

Sorry for the delayed response. We don’t use variable referencing in our Gitlab secrets.

I wasn’t able to get it to work consistently so I refactored our pipelines to use the Doppler CLI instead of the secret exporting. This works like a charm.

Thanks for checking the issue though, it might still be a problem for other customers that use Doppler in combination with exporting to GitLab.