To refresh my memory, I set up a demo that shows the configuration https://gitlab.com/tkfm/gitlabdemodownstream.jl/-/merge_requests/1
Just following https://docs.gitlab.com/ee/ci/ssh_keys/README.html
Concrete steps:
- Create an SSH key pair with
ssh-keygen -t ed25519 -C GitLabDemoDownstream@gitlab-ci -f key- Add the public key as a deploy key at https://gitlab.com/tkfm/gitlabdemoupstream.jl/-/settings/repository#js-deploy-keys-settings
- Add the private key as
SSH_PRIVATE_KEYenvironment variable at https://gitlab.com/tkfm/gitlabdemodownstream.jl/-/settings/ci_cd
- Turn off
Protectedswitch.
- Without this,
$SSH_PRIVATE_KEYis not set andssh-addwould complain thatError loading key "(stdin)": invalid formatJulia 1.5 (#759713949) · Jobs · Takafumi Arakaki / GitLabDemoDownstream.jl · GitLab— https://gitlab.com/tkfm/gitlabdemodownstream.jl/-/merge_requests/1
The CI for the merge request was run before making these repositories public.
I also invited you to the repositories so that you can see the settings.
Edit: Protected switch setting would look like:
