...
- Prepare your personal access token. Take a look here to find documentation - link.
- Log in to gitlab.eufus.psnc.pl
- On the top bar, select Menu > Projects and find your project
On the left sidebar, select Settings > CI/CD
- Expand Variables
- Click Add Variable
Name the variable in Key field.
Enter <your_gitlab_token>:<your_github_username> as the Value.Tip Remove Protect variable checkbox to use it in each tag or branch
Warning Mark Mask variable to protect your confidential data from others.
Access token serves the purpose of password.
Be careful! If somebody intercepts your token all your repositories might be at risk! Do not share your access tokens!- Press Add variable.
If you performed the steps correctly, the list should display as below Update you .gitlab-ci.yml file to use variable with access token
Code Block title .gitlab-ci.yml linenumbers true stages: - Test Docker with access to external repository Execution inside Docker container: stage: Test Docker with access to external repository tags: - Docker image: 'gitlab.eufus.psnc.pl:5050/g2michal/imas-based-docker/ual-fc2k' before_script: - module load IMAS - imasdb test - git clone https://$CREDENTIALS@github.com/mkopsnc/beaver-data.git - tar -xf beaver-data/data/input/input.tar.gz -C $HOME/public/imasdb/test/3/0 script: - make - ./bin/main
Check your CI/CD pipelines. If everything is okay, job should be successful
...