Git says "Warning: Permanently added to the list of known hosts"

git stash
git commit
git reset
git rebase
git commands
git reset --hard
git push
git add

Every time I use git to interact with a remote, such as when pulling or pushing, I am shown the following message:

Warning: Permanently added '...' (RSA) to the list of known hosts.

How can I prevent this annoying message from displaying? It is only an annoyance—everything functions properly.

Solution: create a ~/.ssh/config file and insert the line:

UserKnownHostsFile ~/.ssh/known_hosts

You will then see the message the next time you access Github, but after that you'll not see it anymore because the host is added to the known_hosts file. This fixes the issue, rather than just hiding the log message.

This problem was bugging me for quite some time. The problem occurs because the OpenSSH client compiled for Windows doesn't check the known_hosts file in ~/.ssh/known_hosts

ssh -vvvvvvvvvvvvvvvvvvv

debug3: check_host_in_hostfile: filename /dev/null
debug3: check_host_in_hostfile: filename /etc/ssh/ssh_known_hosts
debug3: check_host_in_hostfile: filename /dev/null
debug3: check_host_in_hostfile: filename /etc/ssh/ssh_known_hosts
Warning: Permanently added ',' (RSA) to the list of known hosts.

Undoing Things, For example, let's say you've changed two files and want to commit them as two Right below the “Changes to be committed” text, it says use git reset HEAD  Git is a version control platform which allows several people to work on files simultaneously and push their local copy of the code to the one stored in the cloud. This way if you change some downloaded (or already pushed) code and push it again to the cloud, the changes will be overwritten in the cloud by your local copy.

Add the following line to your ssh config file ($HOME/.ssh/config):


If running ssh from the command line add the following option to the command string:

-o LogLevel=quiet

For example, the following prints out the gcc version installed on (and no warning):

ssh -o UserKnownHostsFile=/dev/null \
    -o StrictHostKeyChecking=no \
    -o LogLevel=quiet \
    -i identity_file \ \
    gcc -dumpversion

Why does Git say my master branch is "already up to date" even , I think your basic issue here is that you're misinterpreting and/or misunderstanding what git does and why it does it. When you clone some  Another easy way to get Git installed is by installing GitHub Desktop. The installer includes a command line version of Git as well as the GUI. It also works well with PowerShell, and sets up solid credential caching and sane CRLF settings. We’ll learn more about those things a little later, but suffice it to say they’re things you want.

Set LogLevel to ERROR (not QUIET) in ~/.ssh/config file to avoid seeing these errors:

Host *
   StrictHostKeyChecking no
   UserKnownHostsFile /dev/null
   LogLevel ERROR

Oh Shit, Git!?!, Oh shit, I need to change the message on my last commit! git commit --amend # follow prompts to change the commit message. Stupid commit message  Git Says "Everything Up to Date" when is clearly is not. So, I've been going through the effort of learning git so that I can push our website to an out-of-date development repo (which was our website in development). I never used git before this, and the developer of our site dropped git on us and ran for the hills.

That message is from SSH, which is warning you that you are connecting to a host which you've never connected to before. I wouldn't recommend turning it off, since it would mean that you might miss a warning about a host key changing, which can indicate a MITM attack on your SSH session.

Git wants to push files that don't even exist, So git says: <File> exceeds GitHub's file size limit of 100.00 MB. Alright, no problem, I didn't need them anyway right now, so I deleted the folder  Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. It outclasses SCM tools like Subversion, CVS, Perforce, and ClearCase with features like cheap local branching , convenient staging areas , and multiple workflows .

To suppress warning messages for ssh you can add the following lines to ~/.ssh/config:

Host *
LogLevel error

That will disable warnings but not error messages. Like the other settings in ~/.ssh/config you can configure the LogLevel on a per-host basis if you want a more finegrained control.

Git submodule shows new commits, submodule status says nothing , It's because Git records which commit (not a branch or a tag, exactly one commit represented in SHA-1 hash) should be checked out for each submodule. Note that (at least for some projects) you must have a github account with an ssh key. Look at the keys listed in your authentication agent (ssh-add -l) (if you don't see any, add one of your existing keys with ssh-add /path/to/your/key (eg: ssh-add ~/.ssh/id_rsa)) (if you don't have any keys, first create one.

Git Says "Everything Up to Date" when is clearly is not. : git, 8 months later, I've dabbled with git on other projects to feel confident on pushing all the changes to the GitLab remote repo. So I SSH into our web server. I stage  Git comes with built-in GUI tools (git-gui, gitk), but there are several third-party tools for users looking for a platform-specific experience. View GUI Clients → Logos

Git Status, git status On branch master Your branch is up-to-date with 'origin/master'. nothing Note that the message at the end of git status now says "nothing to commit,  Yet another simple task made difficult by Git. The Git devs should use Stack Overflow as feedback in their SDLC loop. 850,000+ people should indicate something is seriously wrong with Git's workflow. They need to hire a UX expert because they clearly cannot git it right on their own. – jww Sep 16 '17 at 9:28 |

How to Get Started with GIT and work with GIT Remote Repo, For Windows, use the "Git Bash" command shell bundled with Git Installer to issue When you create a new branch (says devel , or development ), Git creates a  I'm using Mac and I struggled to find the solution. My remote address was right and as said, it was a credentials problem.Apparently, in the past I used another Git Account on my computer and the mac's Keychain remembered the credentials of the previous account, so I really wasn't authorised to push.

  • Do you really mean every time? Is it giving you a prompt of the form The authenticity of host '...' can't be established. RSA key fingerprint is .... Are you sure you want to continue connecting (yes/no)?, or have you suppressed that? If it is, is it the same fingerprint every time? If it's not, that's really scary. The less scary option would be that somehow it's not actually managing to write to the hosts file, so it tries again every time. Have a look at ~/.ssh/known_hosts?
  • Yes. <i>Every</i> time. However, I don't see the "Are you sure..." message - maybe I've suppressed it.
  • Is the host listed in ~/.ssh/known_hosts? (Is it listed 5000 times?) Does ~/.ssh/config exist/contain anything (especially a value for StrictHostKeyChecking)?
  • The host is listed in that file once, and it is the only entry.
  • I'm guessing the contents of your known_hosts file are bad. It should be the host key, on one terribly long line. If you only have the host name there (for example) it will not work. I recommend that you remove this file (if indeed it only contains the information for this single host) and allow SSH to create it next time you connect. It should be silent after that.
  • Yeah, I don't consider suppressing warnings or errors a proper solution to a problem. ;)
  • recently, I faced same issue on my ubuntu machine. It started to behave this way after I used a different (from my default ~/.ssh/id_rsa) key to connect to a server. As @JeremiahGowdy mentioned, I have debug3: load_hostkeys: loading entries for host "" from file "/dev/null". Why does SSH starts using /dev/null as known_hosts after I changed key?
  • Works great! Finally the stupid warning stopped. Btw on Windows, the ~ in ~/.ssh/config is the user's home folder. To open it easily, Press Win-R, type cmd Enter. Command prompt should already open in your home folder. Type cd .ssh Enter, and then start . Enter to open the folder in Windows Explorer. Then you can create the config file in Notepad (no .txt extension when saving). (Pro users can echo directly to a new file in command prompt itself ;)). Run a git command involving remote twice (like git fetch), and you're done.
  • why do you have 20 v's for ssh?
  • @bubakazouba The more v's, the more verbose the log gets, check the docs for that. Three would suffice, twenty are an overkill :D
  • Adding "LogLevel=quiet" to the "config" file worked. Thank you.
  • To maintain security, it would be good to put the "LogLevel=quiet" inside a "Host" section.