git clone ssh identity file not accessible

I am using git.sh on this link, and I have key file:

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

but when I run on mac

./git.sh -i ~/.ssh/id_rsa/pri_rsa.ppk clone ssh://: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.

EDIT: It turns out I made two mistakes here. when using ssh in mac, should convert private key from ppk to pem first:

puttygen xxx.ppk -O private-openssh -o xxx.pem

(install putty first using sudo brew install putty)

3

1 Answer

chmod u+x /Users/tiina/.ssh/id_rsa/

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like