Coworking/git

[Git] fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists

Superkill 2017. 1. 6. 03:24
반응형



fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists


위 에러가 뜨면서 pull도 push도 안되는 상황.



https://help.github.com/articles/error-permission-denied-publickey/

문제를 해결하기 위해 위 링크에서 시키는 대로 진행을 했다



깃헙 서버에 ssh로 연결이 되는지 체크해봤는데

ssh -vT git@github.com

연결이 안된다..


그래서 다른 방법을 시도해봄


https://help.github.com/articles/using-ssh-over-the-https-port/


방화벽 문제일 수도 있다고 해서 HTTPS 포트로 SSH테스트

ssh -T -p 443 git@ssh.github.com

하니까 된다.


이제 이걸 config에 적용시키기 위해서

centos7 기준 /etc/ssh/ssh_config 파일에


Host github.com
  Hostname ssh.github.com
  Port 443

내용을 추가해주니 pull&push가 잘 동작한다.

'Coworking > git' 카테고리의 다른 글

On undoing, fixing, or removing commits in git  (0) 2018.04.21
push를 잘못 했을 때  (0) 2018.04.19
git commit template 변경  (0) 2018.04.05