We want to get some private repositories from Github into our development server. This works:
ssh -vT git@github.com
However
git clone 'ssh://github.com/company/repo -v' '/var/www/api/shared/vendor/'
doesn’t work. It gives a Permission denied (publickey) error.
I’m using Composer to download the repositories.
Any idea on why it’s not working?
You’re not specifying the
gituser in yourgit clonecommand, whereas you did in the ssh command.If you have trouble with this still, then you can set
GIT_TRACE=1and re-run the command to see exactly what it is doing. More likely, you’ll want to find an ssh command that fails and run it with the-voption to see why authentication is failing (wrong key, etc). Make sure you run both commands in the exact same environment.More help is available at Github.