Macos 如何在Mac OS X上将ssh凭据传递给docker守护进程?
我希望在我的Macos 如何在Mac OS X上将ssh凭据传递给docker守护进程?,macos,docker,ssh,Macos,Docker,Ssh,我希望在我的docker compose.yml文件中有这样一个部分: services: thing: build: git@server.company.com/path/to/project.git 然后我想用docker compose build thing 但当我尝试这样做时,它失败了 ERROR: error fetching: fatal: 'git@server.company.com/path/to/project.git' does not
docker compose.yml
文件中有这样一个部分:
services:
thing:
build: git@server.company.com/path/to/project.git
然后我想用docker compose build thing
但当我尝试这样做时,它失败了
ERROR: error fetching: fatal: 'git@server.company.com/path/to/project.git' does not appear to be a git repository
fatal: Could not read from remote repository.
可能它失败了,因为它需要我的ssh密钥来访问存储库,而docker守护进程运行在一个无法访问我的密钥的linux VM中
如何将ssh密钥或ssh代理套接字传递给docker守护进程,使其能够访问私有存储库?这回答了您的问题。我认为不会。这是关于首先传递ssh信条来访问docker文件,而不是访问容器中的ssh密钥