Я новичок в Gitlab, надеясь найти здесь помощь.
У меня есть виртуальная машина в GCP, на которой запущен Debian Linux.Я использую Gitlab для внесения изменений в эту виртуальную машину.Для предварительных условий у меня есть сгенерированные и добавленные в Gitlab ключи SSH.
Вот так выглядит мой gitlab-ci.yml
before_script:
- apt-get update -qq && apt-get install -y -qq sshpass
deploy_stage:
stage: deploy
environment: Staging
only:
- stage
script:
- ls
- sshpass -V
- export SSHPASS=$USER_PASS
- sshpass -e scp -o stricthostkeychecking=no -r . xxxxxx@xx.xxx.xx.xx:/datastore/test
Но когда я объединяю изменения, я получаю следующую ошибку
Вывод из конвейерного задания
$ ls
test
test2
test2-merge
$ sshpass -V
sshpass 1.06
(C) 2006-2011 Lingnu Open Source Consulting Ltd.
(C) 2015-2016 Shachar Shemesh
This program is free software, and can be distributed under the terms of the GPL
See the COPYING file for more information.
Using "assword" as the default password prompt indicator.
$ export SSHPASS=$USER_PASS
$ sshpass -e scp -o stricthostkeychecking=no -r . xxxxxx@xx.xxx.xx.xx:/datastore/test
***Warning: Permanently added 'xx.xxx.xx.xx' (ECDSA) to the list of known hosts.
Permission denied (publickey).***
lost connection
ERROR: Job failed: exit code 1
Чего мне не хватает?