79343013

Date: 2025-01-09 14:45:02
Score: 0.5
Natty:
Report link

Turns out you need a docker config json secret to make it work.

Which can be created like so:

kubectl create secret generic registry-gitlab-com-repo-auth \
 --namespace crossplane-system \
 --from-file=.dockerconfigjson=config.json \
 --type=kubernetes.io/dockerconfigjson

The config.json file (refered to in the above statement) should look like this:

{                                                                                                                                                                                                                                                                                                                                                                        
    "auths": {                                                                                                                                                                                                                                                                                                                                                                              
        "registry.gitlab.com": {                                                                                                                                                                                                                                                                                                                                                            
            "auth": "<base64_encoded_username_password_combination_like_in_basic_auth>"                                                                                                                                                                                                                                                                                      
        }                                                                                                                                                                                                                                                                                                                                                                                   
    }                                                                                                                                                                                                                                                                                                                                                                                       
}

To create the base64 encoded auth string on the command you could use:

USER=foo
PASS=bar
echo -n $USER:$PASS | base64  # should output the base64 encoded string
Reasons:
  • Long answer (-1):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low entropy (1):
  • Low reputation (0.5):
Posted by: Tommy Bravo