I'm trying to host a git repository from my home OS X machine, and I'm stuck on the last step of cloning the repository from a remote system. Here's what I've done so far:

  1. On the OS X (10.6.6) machine (heretofore dubbed the "server") I created a new admin user
  2. Logged into the new user's account
  3. Installed git
  4. Created an empty git repository via "git init"
  5. Turned on remote login
  6. Set port mapping on my router (airport extreme) to send ssh traffic to the server
  7. Added a ".ssh" directory to the user's home directory
  8. From the remote machine (also an OS X 10.6.6 machine), I sent that machine's public key to the server using scp and the login credentials of the user created in step 1
  9. To test that the server would use the remote machine's public key, I ssh'd to the server using the username of the user created in step 1 and indeed was able to connect successfully without being asked for a password
  10. I installed git on the remote machine
  11. From the remote machine I attempted to "git clone ssh://user@my.server.address:myrepo" (where "user", "my.server.address", and "myrepo" are all replaced by the actual username, server address and repo folder name, respectively)

However, every time I try the command in step 11, I get asked to confirm the server's RSA fingerprint, then I'm asked for a password, but the password for the user I set up for that machine never works.

Any advice on how to make this work would be greatly appreciated!

git clone ssh://user@my.server.address:myrepo

Pay special attention to the address you are using. If it really is in the format you listed then its incorrect. Assuming the repo is located in ~user, the user's home directory, the following commands would be the correct syntax.

git clone user@my.server.address:myrepo
git clone ssh://user@my.server.address/home/user/myrepo

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.