I have a Rails 4 project that started at github and then it was moved to a private git repository. I can work perfectly with the repo (push, clone). I searched for references to the github repo somewhere in the code but none exists.. it must be something related to GIT and how the repository started..
Important: I was able to deploy with this configuration from my private repo until I removed the github one.
Of course I have updated config/deploy.rb
set :repo_url, '/srv/git/project.git'
origin firstname.lastname@example.org:/srv/git/project.git (fetch)
origin email@example.com:/srv/git/project.git (push)
01 mkdir -p /tmp
✔ 01 server 6.019s
01 git ls-remote --heads /srv/git/project.git
01 6b0c9f5ad2d8e768902c5da1509fd99915068295 refs/heads/master
✔ 01 server 0.356s
01 mkdir -p /home/user/applications/project/shared /home/user/applications/project/releases
✔ 01 user@server 0.335s
01 mkdir -p /home/user/applications/project/shared/public/assets
✔ 01 user@server 0.331s
The repository mirror is at /home/user/applications/project/repo
01 git remote update --prune
01 Fetching origin
01 remote: Invalid username or password.
01 fatal: Authentication failed for 'https://github.com/user/project.git/'
01 error: Could not fetch origin
You have to change the origin on the server. The easiest way to accomplish this would probably be to SSH into the server, navigate to
git remote set-url origin /srv/git/project.git
I don't believe that capistrano will automatically update the remote.