IntelliJ IDEA에서 GitLab 저장소 접근 오류가 발생하는 경우의 조치 방법(Could not read from remote repository)

오늘(2016-06-03) GitLab 저장소에 pull을 실행했더니 오류가 발생한다.

10:24:31.442: [my-repo] git -c core.quotepath=false pull --progress --no-stat -v --progress origin develop
java.io.IOException: Illegal char in base64 code.
    at com.trilead.ssh2.crypto.Base64.decode(Base64.java:107)
    at com.trilead.ssh2.KnownHosts.initialize(KnownHosts.java:412)
    at com.trilead.ssh2.KnownHosts.initialize(KnownHosts.java:440)
    at com.trilead.ssh2.KnownHosts.addHostkeys(KnownHosts.java:137)
    at org.jetbrains.git4idea.ssh.SSHMain.configureKnownHosts(SSHMain.java:462)
    at org.jetbrains.git4idea.ssh.SSHMain.start(SSHMain.java:155)
    at org.jetbrains.git4idea.ssh.SSHMain.main(SSHMain.java:137)
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.

Git Bash에서 fetch 명령을 실행하니 아래와 같이 ECDSA key를 ~/known_hosts에 추가 할거냐고 묻는다.

$ git -c core.quotepath=false fetch origin --progress --prune
The authenticity of host 'gitlab.com (104.210.2.228)' can't be established.
ECDSA key fingerprint is SHA256:HbW3g8zUjNSksFbqTiUWPWg2Bq1x8xdGUrliXFzSnUw.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'gitlab.com,104.210.2.228' (ECDSA) to the list of known hosts.
From gitlab.com:my-account/my-repo

추가하면 Git Bash에서는 문제가 해결되지만 IDEA에서는 여전히 오류가 발생한다.

~/known_hosts 파일을 열어서 예전 gitlab.com 정보(gitlab.com,62.204.93.103 ...)를 삭제하면 문제가 해결된다.


EOF

신고