"Failed to add the host to the list of known hosts."

I wanted to try and use gitin my usual Windows prompt instead of Git Bash. Just for the reason that I could use the terminal that IntelliJ provides. I decided it would be 1 minute, but I think not.

When you try git pull origin <branch>, the following error message appears:

C:\Users\Username\Documents\Bitbucket\java-project>git pull
Could not create directory '/c/Username/.ssh'.
The authenticity of host 'bitbucket.org (131.103.20.167)' can't be established.
RSA key fingerprint is 12:8c:1b:f2:6d:14:6b:5c:3b:ec:aa:46:46:xy:7c:40.
Are you sure you want to continue connecting (yes/no)? yes
Failed to add the host to the list of known hosts (/c/Username/.ssh/known_hosts).
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

I set permissions for the existing folder .sshso that all users have full access, administrators and SYSTEM. So everything should be in order.

I also tried running the invitation as an administrator to find out if this is a problem, but it is not.

, : Could not create directory '/c/Username/.ssh'.. .ssh C:\Users\Username\.ssh. , .

Git : 1.9.0.msysgit.0 Windows: Windows 8.1

+4
2

, msysgit 1.9.2, git git, cmd.exe (, , git bash, MSYS cmd.exe), git clone cmd.exe.

ssh HOME, .ssh/, git . HOME, Windows, , echo %HOME% cmd.exe , HOME.

, .


, , C:UsersUsername, , , , - . git bash , :

echo C:\Users\Username
echo 'C:\Users\Username'
+4

, cmd git-cmd.bat, Git Windows msysgit.

HOME %USERPROFILE%, C:\Users\Username.
, HOME, : unset it, .

+1

Source: https://habr.com/ru/post/1542781/


All Articles