Import ssh key
This commit is contained in:
parent
6271d3455f
commit
a9438a8eaf
2 changed files with 7 additions and 1 deletions
|
@ -9,6 +9,12 @@ stages:
|
|||
- plagiates
|
||||
|
||||
before_script:
|
||||
## get ssh private key from secret variable
|
||||
- eval $(ssh-agent -s)
|
||||
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
|
||||
- mkdir -p ~/.ssh
|
||||
- chmod 700 ~/.ssh
|
||||
## get API token from secret variable
|
||||
- cp python-gitlab.cfg $HOME/.python-gitlab.cfg
|
||||
- echo "private_token = ${PRIVATE_API_TOKEN}" >> $HOME/.python-gitlab.cfg
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue