Not able to clone private repository inside docker

Hello there!
I have machine, inside machine I’m running docker container which is clonning another repository. In this container I have
~/.ssh/config file which is pointing to github.pem key, all permissions are OK, but still receiving (Permission denied). I’ve tried the same image in local env and in aws ec2 and everywhere it’s working fine but not in Circle.
What I’ve tried:

  • added add_ssh_keys step
  • configured in options: checkout ssh keys
  • configured in options: checkout ssh permissions
    I’m able to clone this repository in machine scope but not able to do this inside docker in this machine.
    Please any advice?

If this is happening inside your inner Docker container this is not something that is caused by CircleCI and will likely be rather hard to troubleshoot.

I recommend running an SSH build https://circleci.com/docs/2.0/ssh-access-jobs/ and then entering the Docker container to see what’s going on.

Can you share your config here in case there’s a clue we can spot?

Thank you for tips, SSHed into container and found an issue - problem was related to directory permissions.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.