
Ich verwende git.sh aufDasLink, und ich habe die Schlüsseldatei:
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
aber wenn ich auf dem Mac laufe
./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.
BEARBEITEN: Es stellte sich heraus, dass ich hier zwei Fehler gemacht habe. Bei Verwendung von SSH auf dem Mac sollte zuerst der private Schlüssel von PPK in PEM konvertiert werden:
puttygen xxx.ppk -O private-openssh -o xxx.pem
(installieren Sie zuerst Putty mit sudo brew install putty
)
Antwort1
chmod u+x /Users/tiina/.ssh/id_rsa/