2017-05-31 3 views
1

J'essaye de déployer une application rails sur Digital Ocean avec Capistrano et j'ai des moments difficiles. Je reçois ceRails, Capistrano, bitbucket, permission refusée (publickey)

00:00 git:check 
    01 git ls-remote [email protected]:paaggeli/mutetale.git HEAD 
    01 Permission denied (publickey). 
    01 fatal: Could not read from remote repository. 
    01 
    01 Please make sure you have the correct access rights 
    01 and the repository exists. 
(Backtrace restricted to imported tasks) 
cap aborted! 
SSHKit::Runner::ExecuteError: Exception while executing on host 
46.101.112.45: Exception while executing on host 46.101.112.45: git exit status: 128 
git stdout: Nothing written 
git stderr: Permission denied (publickey). 
fatal: Could not read from remote repository. 

Please make sure you have the correct access rights 
and the repository exists. 

SSHKit::Runner::ExecuteError: Exception while executing on host 46.101.112.45: git exit status: 128 
git stdout: Nothing written 
git stderr: Permission denied (publickey). 
fatal: Could not read from remote repository. 

Please make sure you have the correct access rights 
and the repository exists. 

SSHKit::Command::Failed: git exit status: 128 
git stdout: Nothing written 
git stderr: Permission denied (publickey). 
fatal: Could not read from remote repository. 

Please make sure you have the correct access rights 
and the repository exists. 

Tasks: TOP => deploy:initial 
(See full trace by running task with --trace) 
The deploy has failed with an error: Exception while executing on host 46.101.112.45: Exception while executing on host 46.101.112.45: git exit status: 128 
git stdout: Nothing written 
git stderr: Permission denied (publickey). 
fatal: Could not read from remote repository. 

Please make sure you have the correct access rights 
and the repository exists. 

fichier capistrano.log

DEBUG Uploading /tmp/git-ssh-mutetale-production-ubuntu.sh 0.0% 

INFO Uploading /tmp/git-ssh-mutetale-production-ubuntu.sh 100.0% 

INFO [1baad1b1] Running /usr/bin/env chmod 700 /tmp/git-ssh-mutetale-production-ubuntu.sh on 46.101.112.45 

DEBUG [1baad1b1] Command: (export RBENV_ROOT="$HOME/.rbenv" RBENV_VERSION="2.4.1" ; /usr/bin/env chmod 700 /tmp/git-ssh-mutetale-production-ubuntu.sh) 

INFO [1baad1b1] Finished in 0.156 seconds with exit status 0 (successful). 

INFO [2cd1c0fa] Running /usr/bin/env git ls-remote [email protected]:paaggeli/mutetale.git HEAD on 46.101.112.45 

DEBUG [2cd1c0fa] Command: (export RBENV_ROOT="$HOME/.rbenv" RBENV_VERSION="2.4.1" GIT_ASKPASS="/bin/echo" GIT_SSH="/tmp/git-ssh-mutetale-production-ubuntu.sh" ; /usr/bin/env git ls-remote gi[email protected]:paaggeli/mutetale.git HEAD) 

DEBUG [2cd1c0fa]  Permission denied (publickey). 

DEBUG [2cd1c0fa]  fatal: Could not read from remote repository. 



Please make sure you have the correct access rights 

and the repository exists. 

Courir ssh -T [email protected] sur le serveur renvoie:

connecté en tant paaggeli.

Vous pouvez utiliser git ou hg pour vous connecter à Bitbucket. L'accès au shell est désactivé.

S'il vous plaît aidez-moi

+0

obtenu la même erreur aujourd'hui. Mais à '00: 21 bundler: install 'ce point a été abandonné. à peu près le même journal des erreurs. –

+0

Ajout de mémoire d'échange résolu mon problème. Si possible, essayez de mettre à jour votre serveur –

+0

Merci pour votre réponse @AkashPinnaka mais j'ai toujours la même erreur –

Répondre

0

Vérifiez votre accès git et assurez-vous que l'utilisateur utilise votre Capistrano pour cloner le repo a un accès en lecture.

  1. Exécutez la procédure ssh-keygen sur votre serveur.
  2. Dans le coin supérieur droit de n'importe quelle page GitHub, cliquez sur votre photo de profil.
  3. Sur votre page de profil, cliquez sur l'onglet Référentiels, puis sur le nom de votre référentiel.
  4. Onglet Paramètres Dans la barre latérale droite de votre référentiel, cliquez sur Paramètres.
  5. Dans la barre latérale, cliquez sur Déployer les clés.
  6. Cliquez sur Ajouter une clé de déploiement. Collez votre clé publique et envoyez-la.

https://developer.github.com/v3/guides/managing-deploy-keys/#setup-2

+0

Comment puis-je faire cela? –

+0

Mise à jour de la réponse avec des instructions pour l'ajout d'une clé de déploiement –

+0

J'utilise bitbucket et j'ai ajouté la clé publique. Toujours la même erreur. Merci pour votre réponse. –