GitLab'de yer alan projem için bir pipeline kurdum. EC2 windows sunucuya ssh ile bağlanmaya çalışıyorum. Pipeline Deploy aşamasında "Permission denied" hatası veriyor. Ücretli olarak Gitlab CI/CD ve AWS EC2 Windows makinelerinde bilgi sahibi destek verecek arkadaş arıyorum. Biraz acil.
Teşekkürler.
Pipeline .yml dosyam:
stages:
- build
- deploy
variables:
SSH_PRIVATE_KEY: $SSH_PRIVATE_KEY
EC2_HOST: $EC2_HOST
EC2_USER: $EC2_USER
build:
stage: build
image: node:16
script:
- echo "Installing dependencies"
- npm install
- echo "Running build process"
- npm run build
artifacts:
paths:
- dist/
deploy:
stage: deploy
image: alpine:latest
script:
- apk add --no-cache openssh
- mkdir -p ~/.ssh
- chmod 600 ~/.ssh/id_rsa
- ssh-keyscan -H $EC2_HOST >> ~/.ssh/known_hosts
- ssh -v -i ~/.ssh/id_rsa $EC2_USER@$EC2_HOST 'mkdir -p C:/Users/Administrator/Desktop/test_deploy'
- rsync -avz dist/ $EC2_USER@$EC2_HOST:"C:/Users/Administrator/Desktop/test_deploy"
only:
- masterDeploy aşamasında Alınan Hata:Permission denied (publickey,password,keyboard-interactive).