Using ssh-agent with docker on macOS

后端 未结 8 2144
不思量自难忘°
不思量自难忘° 2021-02-02 10:18

I would like to use ssh-agent to forward my keys into the docker image and pull from a private github repo.

I am using a slightly modified version of https://github.com/

8条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-02 10:30

    Could not open a connection to your authentication agent.

    This error occurs when $SSH_AUTH_SOCK env var is set incorrectly on the host or not set at all. There are various workarounds you could try. My suggestion, however, is to dual-boot Linux and macOS.

    Additional resources:

    • Using SSH keys inside docker container - Related Question
    • SSH and docker-compose - Blog post
    • Build secrets and SSH forwarding in Docker 18.09 - Blog post

提交回复
热议问题