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:
User1 deploys to a site, capistrano creates a bare repo "cached" on the server for future deploys
Said repo uses the git remote from User1's machine
User2 deploys to same site, but with a newly changed git remote, resulting in this indecipherable wall of error:
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
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: