jderusse / docker-gitsplit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use host ssh authentication

pdoreau opened this issue · comments

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.

`

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