FAQ

24.4. FAQ#

Answers to common questions, grouped by topic. Select a question to expand its answer. To suggest a new entry, use the #cluster-users channel in the Kempner Slack space (see Support and Troubleshooting) or open an issue in the computing handbook GitHub repository.

24.4.1. Git and GitHub#

Cloning a repository fails with a “REMOTE HOST IDENTIFICATION HAS CHANGED” warning

When you try to clone a repository, you see an error like:

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
...

This means the host key the server now presents does not match the one cached in your ~/.ssh/known_hosts file, for example after GitHub rotated its SSH host keys. Remove the stale entry and reconnect to accept the new key:

ssh-keygen -R github.com

The next connection prompts you to accept the new key. Verify its fingerprint against GitHub’s published SSH key fingerprints before accepting.

If you instead see Permission denied (publickey), your SSH key is not registered with your GitHub account. Add it using these guides:

git push, pull, or fetch prompts for a username or shows an askpass error

When you run git push, git pull, or git fetch, you see an error like:

(gnome-ssh-askpass:134672): Gtk-WARNING **: 07:19:13.800: cannot open display:
error: unable to read askpass response from '/usr/libexec/openssh/gnome-ssh-askpass'
Username for 'https://github.com':

This happens because the repository’s remote uses https instead of ssh. Switch the remote to SSH:

git remote set-url origin git@github.com:[Github account]/[Github repository].git

Replace [Github account] with your GitHub account and [Github repository] with the repository you are pushing to.