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_KEY
environment variable at https://gitlab.com/tkfm/gitlabdemodownstream.jl/-/settings/ci_cd
- Turn off
Protected
switch.
- Without this,
$SSH_PRIVATE_KEY
is not set andssh-add
would complain thatError loading key "(stdin)": invalid format
Julia 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: