If I understand your question correctly, you want your CI pipeline that started npm to be able to pull a private project from your gitlab as a dependency.
gitlab (. ).
SSH. ssh-keygen -t rsa .
gitlab Deploy Keys. , .
, npm CI, Variables. SSH_PRIVATE_KEY, , , .
, .gitlab-ci.yml , CI:
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
- eval $(ssh-agent -s)
- ssh-add <(echo "$SSH_PRIVATE_KEY")
- mkdir -p ~/.ssh
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
CI , .