I want to use a make file to deploy my symfony project, it would connect tho distant host with ssh ,change directory and pull git form github, here is the make file
.PHONY: install deploy
deploy:
ssh [email protected] 'cd ippp.ninapresotto.com && git pull origin main && make install'
install: vendor/autoload.php
php bin/console doctrine:migrations:migrate -n
npm run build
php bin/console cache:clear
vendor/autoload.php: composer.lock composer.json
composer install
touch vendor/autoload.php
I use command : make deploy
with wsl on windows
so connection ssh is ok, my ssh password is asked and connects then I have a permission error
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
make: *** [Makefile:4: deploy] Error 1
I don’t understand because this command
ssh -T [email protected]
outputs
Hi supersonicBlonde! You've successfully authenticated, but GitHub does not provide shell access.
also when i connect with ssh with putty : git pull origin main
works fine
What do i do wrong ?
Thanks people.