If you ever get a publickey denied error while trying to setup a github repo on a hosting account follow these steps.
- Create a new Public/Private SSH on server
- Copy public key and add a “deploy key” on github
- Add your privatekey to the git config
1 2 3 4 5 6 |
git -c core.sshCommand="ssh -i ~/.ssh/<your_key>" clone git@github.com:<user>/<repo>.git git config core.sshCommand 'ssh -i ~/.ssh/<your_key>' #test if key is working ssh -T -ai ~/.ssh/g<your_key> git@github.com |