“Warning: the ECDSA host key for ‘github.com’ differs from the key for the IP address” issue

If you are getting the following error: Warning: the ECDSA host key for ‘github.com’ differs from the key for the IP address ‘IP_ADDRESS’ I would recommend to do the following: $ ssh-keygen -R github.com If that does not work then remove the IP itself from known-host: $ ssh-keygen -R IP_ADDRESS This should would fix your … Read more

How does git know which ssh key to use for its operations?

Git does not know, or care. It just runs ssh. How does ssh know? It looks at your ~/.ssh/config file (edit: or gets it from ssh-agent; see below): Host github.com # IdentitiesOnly yes # see below to decide if you want this IdentityFile ~/.ssh/github_id_file Host domain.com IdentitiesOnly yes # again, see below IdentityFile ~/.ssh/another_id_file Edit: … Read more

How do I add an SSH key in gitlab?

Go to your GitLab account: https://gitlab.com/ Click on Settings on the top right drop-down, which will appear once you select the icon(white-fox image [specific to my profile]). Click on Settings on the top right drop-down, which will appear once you select the icon(white-fox image). Click on SSH Keys: Add/Paste the SSH Key. How to generate … Read more

What, exactly, does ssh-copy-id do?

This little one liner script works on sh, bash, and zsh. I use it every time there is no ssh-copy-id, for example when I’m on older version of OSX. cat ~/.ssh/id_rsa.pub | ssh <user>@<hostname> ‘cat >> ~/.ssh/authorized_keys’ How it works I am sending the public keay to the Unix standard output (STDOUT) using the cat … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)