exited with an unexpected code: 128. Host key verification failed. fatal: Could not read from remote repository.
See original GitHub issueDescription
Just installed GitHub Desktop fresh. I opened a local cloned repo, commited a change and tried to push.
2018-04-20T08:11:04.553Z - info: [ui] Executing fetch: git -c credential.helper= fetch --progress --prune origin (took 3.414s)
2018-04-20T08:11:04.553Z - error: [ui] `git -c credential.helper= fetch --progress --prune origin` exited with an unexpected code: 128.
Host key verification failed.
fatal: Could not read from remote repository.
I suspect the issue is in the git binary that GH desktop is using.
Version
- GitHub Desktop: 1.1.1
- Operating system: Microsoft Windows [Version 10.0.16299.371]
Steps to Reproduce
Install GitHub Desktop fresh. I opened a local cloned repo, commited a change and tried to push.
Expected Behavior
Pushes
Actual Behavior
Authentication error modal
Additional Information
Have installed git for windows, git in cygwin and gitkraken. All these work in their own respective environments.
Logs
Relevant excerpt provided above
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Git error: "Host Key Verification Failed" when connecting to ...
You should be prompted to add github to your known hosts. If this hasn't happened, you can run ssh -T git@github.com to receive...
Read more >How to fix the error “host key verification failed” - The Geek Diary
This indicates some environment of the SSH server has changed since last time you connected to it, especially the public key and the...
Read more >GitHub Host Key Verification Failed - How to Use GitLab
desc = Gitlab::Git::RepositoryMirroring::RemoteError: Host key verification failed. fatal: Could not read from remote repository.
Read more >I can't install the repo from a remote bitbucket p...
Exit code : 128 Command: git Arguments: ls-remote --tags --heads. ... I got this error. ... fatal: Could not read from remote repository....
Read more >notebook import from git with LDAP credentials
Branches and tags could not be fetched from remote Git, caused by: IOException: Process failure, caused by: IOException: Process execution ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@deed02392 that’s all the information I needed, and it does indicate that this repository is using SSH.
There are two solutions for this:
host key verification failed
error means that the host key from GitHub Enterprise isn’t in yourknown_hosts
file. You should be able to fix this by running the following command from Git Bash:ssh-keyscan -H <GitHub_Enterprise_URL> >> ~/.ssh/known_hosts
Replace <GitHub_Enterprise_URL> with the URL of the GitHub Enterprise server you are connecting to.
Hope that helps. Let me know if that doesn’t get things working.
@deed02392 thanks for the update. You can check the remote URL the repository is using from GitHub Desktop by going to the file menu and selecting
Repository
>Repository Settings
>Remote
. Let me know what that shows.