ssh - Why suddenly is Capistrano unable to read from my Bitbucket Git repository during deploy? -


i use capistrano (v3.5.0) deploy small rails application local development machine vps hosted on linode using deployment key set on bitbucket. late last week, working charm.

today, however, when run usual cap deploy command, fails @ third step when tried read bitbucket git repository:

debug [6906a62c] command: ( export rbenv_root="$home/.rbenv" rbenv_version="2.2.1"   git_askpass="/bin/echo" git_ssh="/tmp/app/git-ssh.sh" ; /usr/bin/env git   ls-remote --heads git@bitbucket.org:klenwell/app.git ) 

this error:

debug [6906a62c]       conq: repository access denied. debug [6906a62c]       fatal: remote end hung unexpectedly 

i've done obvious troubleshooting: googled errors messages, confirmed vps operational, verified repository accessible, double-checked ssh keys, confirmed ssh agent running. if else fails, try generating new key on vps host.

these points in particular have me flummoxed:

  • there have been (as far can tell) no changes capistrano or vps configuration since last ran successfully. see same command running in capistrano logs last week.
  • when ssh vps server deploy user, can run ssh -t git@bitbucket.org , same exact git command manually without issue.
  • the jenkins server on local machine can read same bitbucket repository using deployment key.

what missing?

by default, capistrano uses ssh agent forwarding. means use local ssh key auth bitbucket.

perhaps local key changed or no longer has bitbucket access, explain why deploy no longer works.

you can disable capistrano's ssh agent forwarding (thereby allowing git use deployment key have installed on server) this:

set :ssh_options, { forward_agent: false } 

Comments

Popular posts from this blog

java - Static nested class instance -

c# - Bluetooth LE CanUpdate Characteristic property -

JavaScript - Replace variable from string in all occurrences -