16. fix use ssh in ci script
This commit is contained in:
@ -51,6 +51,17 @@ job3:
|
||||
variables:
|
||||
GIT_SUBMODULE_STRATEGY: recursive
|
||||
|
||||
before_script:
|
||||
- echo "Prepare ssh environment"
|
||||
- eval $(ssh-agent -s)
|
||||
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
|
||||
- mkdir -p ~/.ssh
|
||||
- chmod 700 ~/.ssh
|
||||
- ssh-keyscan gitlab.com >> ~/.ssh/known_hosts
|
||||
- chmod 644 ~/.ssh/known_hosts
|
||||
- ssh git@gitlab.com
|
||||
- echo "Preparing ssh environment done"
|
||||
- whoami
|
||||
|
||||
script:
|
||||
- whoami
|
||||
|
Reference in New Issue
Block a user