evolution / wordpress

Rapidly create, develop, & deploy WordPress across multiple environments.
MIT License
200 stars 18 forks source link

Reconcile conflicting git remotes on deploy #152

Closed EvanK closed 7 years ago

EvanK commented 8 years ago

We renamed an organization in github, and it causes issues in a team environment where multiple people deploy to the same server but are using conflicting git remotes:

DEBUG[6193f9ea] Running /usr/bin/env [ -f /var/www/example.org/production/master/repo/HEAD ] on production.example.org
DEBUG[6193f9ea] Command: [ -f /var/www/example.org/production/master/repo/HEAD ]
DEBUG[6193f9ea] Finished in 0.241 seconds with exit status 0 (successful).
INFOThe repository mirror is at /var/www/example.org/production/master/repo
DEBUG[abfc8051] Running /usr/bin/env if test ! -d /var/www/example.org/production/master/repo; then echo "Directory does not exist '/var/www/example.org/production/master/repo'" 1>&2; false; fi on production.example.org
DEBUG[abfc8051] Command: if test ! -d /var/www/example.org/production/master/repo; then echo "Directory does not exist '/var/www/example.org/production/master/repo'" 1>&2; false; fi
DEBUG[abfc8051] Finished in 0.235 seconds with exit status 0 (successful).
INFO[bf9106cd] Running /usr/bin/env git remote update on production.example.org
DEBUG[bf9106cd] Command: cd /var/www/example.org/production/master/repo && ( GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/Example.org/git-ssh.sh /usr/bin/env git remote update )
DEBUG[bf9106cd]     Fetching origin
DEBUG[bf9106cd]     Fetching origin
DEBUG[bf9106cd]     ERROR: Repository not found.
DEBUG[bf9106cd]     Fetching origin
DEBUG[bf9106cd]     fatal: Could not read from remote repository.
DEBUG[bf9106cd]
DEBUG[bf9106cd]     Please make sure you have the correct access rights
DEBUG[bf9106cd]     and the repository exists.
DEBUG[bf9106cd]     Fetching origin
DEBUG[bf9106cd]     error: Could not fetch origin
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing on host production.example.org: git exit status: 1
git stdout: Nothing written
git stderr: ERROR: Repository not found.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
error: Could not fetch origin

fixit