Answer the question
In order to leave comments, you need to log in
Permission denied (publickey,password). How to fix?
There is this gitlab-ci:
before_script:
- apt-get update -qq
- apt-get install -qq git
- 'which ssh-agent || ( apt-get install -qq openssh-client )'
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
- mkdir -p ~/.ssh
- git rm --cached .gitlab-ci.yml
- ' && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
deploy_staging:
type: deploy
environment:
name: staging
url: server
script:
- ssh -A [email protected] -p 22 "cd www/site.ru && git checkout master && git pull origin master && composer install && exit"
only:
- master
git init
git remote add origin <ссылка для клона по SSH>
git add .
git commit -m "init"
git push
git pull origin master
$ ssh -A [email protected] 22 "cd www/site.ru && git checkout master && git pull origin master && composer install && exit"
Warning: Permanently added 'server' (ECDSA) to the list of known hosts.
Permission denied, please try again.
Permission denied, please try again.
[email protected]: Permission denied (publickey,password).
ERROR: Job failed: exit code 1
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question