
The command ‘/bin/sh -c ssh-agent /root/. Removing intermediate container 858af7450af0 A complete log of this run can be found in: Please make sure you have the correct access rights npm ERR! fatal: Could not read from remote repository.

npm ERR! /usr/bin/git ls-remote -h -t ssh://:7999/test/resin-access-test-repo.git
Docker ssh agent 2017 install#
RUN ssh-keyscan -t rsa > /root/.ssh/known_hostsīut when it comes to the npm install steps later on, I get the following error message: RUN npm config set msvsversion 2017 ENV GITSSH'C:WindowsSystem32OpenSSHssh.exe' RUN Get-Service -Name ssh-agent Set-Service -StartupType Automatic Start-Service ssh-agent New-Item -ItemType directory /.ssh Out-Null Write-Output 'env:SSHKEY' Out-File /. I played around and added a private id_rsa key to the Dockerfile and added the public key to the repository.ĮNV GIT_SSH_COMMAND=“ssh -i ~/.ssh/id_rsa -o UserKnownHostsFile=/dev/null -o StrictHostKe圜hecking=no”
Docker ssh agent 2017 code#
We need to fetch code from our private bitbucket server (self-hosted). That’s quite a bit more involved though, so it depends on your needs and your security concerns I do have a similar issue. If you want to control access to this further, you can look at tools like Vault, which allow you run your own hosted service that controls access to these keys, and commit a single key for that into your repo, which you can revoke, manage and audit independently of the SSH keys themselves. These allow you to generate an SSH keys with minimal privileges, that can read a single repo and no more, limiting the risk if they’re ever exposed. You can reduce the risks significantly though by using deploy keys (assuming your repos are on Github). Of course this alone isn’t fantastic for security, and you should be very careful if you need to do this.

Right now the best option is to commit a SSH key that has access to clone the private repos (private_repo_1, private_repo_2, …) inside the Dockerfile repo (private_installation_repo), so that the Dockerfile build can access them to clone the rest of the code. We don’t yet have a fantastic solution to this. I’m afraid I don’t have any easy examples: for most cases it’s much easier to push a complete single repo to Resin directly. To build this image though, you’re going to need to give the Resin.io build server access to checkout code from those repos during the build process somehow, which isn’t trivial. I’m not familiar with Moby, so I don’t fully understand the bugs you’ve linked there.
