SSH agent forwarding during docker build

For Docker 18.09 and newer You can use new features of Docker to forward your existing SSH agent connection or a key to the builder. This enables for example to clone your private repositories during build. Steps: First set environment variable to use new BuildKit export DOCKER_BUILDKIT=1 Then create Dockerfile with new (experimental) syntax: # … Read more

SSH is looking in the wrong place for the public/private key pair on Windows

Figured out how to manually set my home directory in Windows XP: Right click “My Computer” Choose the “Advanced” tab Click the “Environmental Variables” button Under the “System variables” section, click “New” In the “Variable name” enter in “home”. In the “Variable value” enter in the path to your profile. To do the same via … Read more

Saving ssh key fails

If you’re using Windows, the unix-style default path of ssh-keygen is at fault. In Line 2 it says Enter file in which to save the key (/c/Users/Eva/.ssh/id_rsa):. That full filename in the parantheses is the default, obviously Windows cannot access a file like that. If you type the Windows equivalent (c:\Users\Eva\.ssh\id_rsa), it should work. Before … Read more

Pulling from Git fails and gives me following error: client_global_hostkeys_private_confirm: server gave bad signature for RSA key 0

The message “client_global_hostkeys_private_confirm: server gave bad signature for RSA key 0” is not an error, it is a warning, and it is related to some ssh versioning issue. It used to be very common to receive from GitLab. If you want it to go away, you can make sure that your ~/.ssh/config contains the following: … Read more

I’ve already setup the ssh key, but VSCode keeps asking for password

It was a problem with the config file. The VSCode needs the “absolute” path. In case of MacOS, ssh-copy-id seems to only copy the absolute path relative to the user. In other words, it omits “/Users/username” before “/.ssh“. Adding “/Users/username” in the IdentityFile attribute in .ssh/config solved the problem.

Error connecting to agent: no such file or directory – adding key to ssh agent [closed]

VonC is probably right, in that you need to fix your path, but I was facing the same problem despite using the correct one. In my case, I needed to start ssh-agent for the command to work. Running the sample commands from GitHub was not working, but, since I had installed OpenSSH, I simply started … Read more

GitHub Error: Key already in use

You can create one more key pair, say id_rsa_personal.pub, and add it to the Github account. Next, create/edit the .ssh/config file. # Default GitHub Host github.com HostName github.com User git IdentityFile ~/.ssh/id_rsa Host github-public HostName github.com User git IdentityFile ~/.ssh/id_rsa_public Host github-personal HostName github.com User git IdentityFile ~/.ssh/id_rsa_personal The above file will help you to … Read more