
나는 git.sh를 사용하고 있습니다이것링크가 있고 키 파일이 있습니다.
sh-3.2# ls -al /Users/tiina/.ssh/id_rsa/
drw------- 4 tiina en 136 Jun 18 19:26 .
drwx------ 5 tiina en 170 Mar 15 2016 ..
-rw-------@ 1 tiina en 1482 Jun 18 19:19 pri_rsa.ppk
하지만 Mac에서 실행하면
./git.sh -i ~/.ssh/id_rsa/pri_rsa.ppk clone ssh://[email protected]:2222/foo
Cloning into 'portal'...
Warning: Identity file /Users/tiina/.ssh/id_rsa/pri_rsa.ppk not accessible: Permission denied.
Load key "/Users/tiina/.ssh/id_rsa": Is a directory
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
편집: 여기서 두 가지 실수를 저지른 것으로 나타났습니다. Mac에서 ssh를 사용할 때 먼저 개인 키를 ppk에서 pem으로 변환해야 합니다.
puttygen xxx.ppk -O private-openssh -o xxx.pem
(먼저 를 사용하여 퍼티를 설치하십시오 sudo brew install putty
)
답변1
chmod u+x /Users/tiina/.ssh/id_rsa/