jderusse / docker-gitsplit

76 stars 10 forks source link

Use host ssh authentication #1

Closed pdoreau closed 8 years ago

pdoreau commented 8 years ago

Hello. Nice thing.

How can I use my host ssh configuration in order to avoid git access error(s) ?

Exception: Error in command "git --git-dir XXXX/.git push -f 9a75...8fba2 :refs/heads/master":

Warning: Permanently added 'bitbucket.org,...' (RSA) to the list of known hosts.
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

`

jderusse commented 8 years ago

On you machine you can share your ssh agent socket by adding the option $SSH_AUTH_SOCK:/ssh-agent --env SSH_AUTH_SOCK=/ssh-agent

In a CI runner, you may add a secret env variable containing the private ssh key pair and configure