I am trying to setup a deployment from my local windows computer through gitlab to my server using capifony.
Usually I would connect by ssh to my server and run the command from the server Now I want to do it from my local computer.
I am already pushing code from my local computer to gitlab with git, i.e. my public key is registered on gitlab.
Here however, it's not working with capifony. What could be the issue ?
The error :
D:\Divers\Programmation\Web\foodmeup.dev>cap development deploy ** transaction: start --> Updating code base with remote_cache strategy *** [deploy:update_code] rolling back ** [deploy:update_code] exception while rolling back: Capistrano::ConnectionError, connection failed for: my_server_ip (ArgumentError: Could not parse PKey: no start line) connection failed for: my_server_ip (ArgumentError: Could not parse PKey: no start line)
If I follow the instructions given in several post and I put in my deploy.rb the following options
ssh_options[:keys] = %w('~/.ssh/id_rsa')
ssh_options[:keys] = %w('~/.ssh/id_rsa.pub')
Then I am asked for a root password and I still get an error (despite the fact I can log in via ssh with putty directly and that running the deployment from my server with another user works without me entering the root password):
D:\Divers\Programmation\Web\foodmeup.dev>cap preprod deploy ** transaction: start --> Updating code base with remote_cache strategy root@my_server_ip's password: ** [my_server_ip :: err] Error reading response length from authentication socket. ** [my_server_ip :: err] Permission denied (publickey). ** [my_server_ip :: err] fatal: Could not read from remote repository. ** ** Please make sure you have the correct access rights ** and the repository exists. *** [deploy:update_code] rolling back failed: "sh -c 'if [ -d /home/foodmeup.net/preprod/shared/cached-copy ]; then cd /home/foodmeup.net/preprod/shared/cached-copy && git fetch -q origin && git fetch --tags -q origin && git reset -q --ha rd f52737bb09edbd968319400e2d535f467c42b04c && git clean -q -d -x -f; else git clone -q -b preprod email@example.com:svassaux/foodmeup.git /home/foodmeup.net/preprod/shared/cached-copy && cd /home/foodme up.net/preprod/shared/cached-copy && git checkout -q -b deploy f52737bb09edbd968319400e2d535f467c42b04c; fi'" on my_server_ip