User 17670
User 17670

Reputation: 243

How can I pull a git folder to a new computer using my ssh key?

I have git on a computer that I'll call Mac1, and access through an ssh key to a folder on my uni's server that I'll call ProjectName.

I want to pull this folder to another computer that I'll call Mac2. On Mac2, I've installed git and told it my username and email address using git config.

How can I do pull ProjectName to Mac2?

Upvotes: 0

Views: 206

Answers (2)

Dyno Fu
Dyno Fu

Reputation: 9044

git clone ssh://username@Mac1/path/to/your.git

unless you really want to let no password access from Mac2, on Mac2 cat id_rsa.pub.Mac1 >> .ssh/authorized_keys

Upvotes: 0

aet
aet

Reputation: 7292

There is a good way: create a new public/private keypair, and have the new public key added to the git server.

There is a not as good way: copy the private key from computer 1 to computer 2.

Upvotes: 4

Related Questions