I'm new to git. I own and have read the Pro Git by Scott Chacon. I can make repo's locally on my Windows 7 desktop and clone them. I can create repo's on my SSH enabled Dreamhost account and can clone them on my shared Dreamhost server.
For the love of God, I cannot clone a Dreamhost repo to my local Windows desktop! It is driving me nuts.
I have ssh keys set up and can log into the dreamhost shared server via my local machine within the bash shell, so my ssh seems to be set up correctly. But I cannot get a clone.
I created my website repo by navigating to the website's Drupal 7 directory (website.com) and issuing git init, git add ., and git commit -m "message". git status shows no issues and clean working directory.
Here is a look at a session as I tried to get a clone of the repo (names have been changed to protect the innocent):
USER@USER-OFFICE ~/Documents/My Dropbox/Websites
$ ssh username@servername.dreamhost.com
_
___ | | __ _| |
/ _ | |/ / | | | |
| () | <| || | |
___/||_\__,||
Welcome to servername.dreamhost.com
Any malicious and/or unauthorized activity is strictly forbidden.
All activity may be logged by DreamHost Web Hosting.
Last login: Wed Feb 8 13:10:33 2012 from IP Address
[servername]$ cd website.com
[servername]$ ls -a
. CHANGELOG.txt INSTALL.txt authorize.php includes profiles update.php
.. COPYRIGHT.txt LICENSE.txt checkphp.php index.php robots.txt web.config
.git INSTALL.mysql.txt MAINTAINERS.txt cron.php install.php scripts xmlrpc.php
.gitignore INSTALL.pgsql.txt README.txt favicon.gif misc sites
.htaccess INSTALL.sqlite.txt UPGRADE.txt favicon.ico modules themes
[servername]$ exit
logout
Connection to servername.dreamhost.com closed.
USER@USER-OFFICE ~/Documents/My Dropbox/Websites
$ git clone ssh://username@servername.dreamhost.com/website.com/.git
Cloning into 'website.com'...
fatal: '/website.com/.git' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
USER@USER-OFFICE ~/Documents/My Dropbox/Websites
$ git clone ssh://username@servername.dreamhost.com:/website.com/.git
Cloning into 'website.com'...
ssh: servername.dreamhost.com:: no address associated with name
fatal: The remote end hung up unexpectedly
USER@USER-OFFICE ~/Documents/My Dropbox/Websites
$ git clone ssh://username@servername.dreamhost.com:~/website.com/.git
Cloning into 'website.com'...
ssh: servername.dreamhost.com:~: no address associated with name
fatal: The remote end hung up unexpectedly
USER@USER-OFFICE ~/Documents/My Dropbox/Websites
$ git clone ssh://username@servername.dreamhost.com:~/website.com.git
fatal: destination path 'website.com' already exists and is not an empty directory.
USER@USER-OFFICE ~/Documents/My Dropbox/Websites
$ git clone ssh://username@servername.dreamhost.com/website.com:/.git
fatal: could not create work tree dir ''.: No such file or directory
USER@USER-OFFICE ~/Documents/My Dropbox/Websites
$ git clone ssh://username@servername.dreamhost.com/website.com:.git
Cloning into '.git'...
fatal: '/website.com:.git' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
USER@USER-OFFICE ~/Documents/My Dropbox/Websites
$I'm stumped and have looked everywhere for solutions.
Thanks for any help!

Comments
git clone
git clone ssh://username@servername.dreamhost.com/absolute/path/to/repo.gitor maybe
git clone ssh://username@servername.dreamhost.com/website.com.gitgit clone - SOLVED!
You put me on the right path. Thank you Tom!
Since any SSH into
username@servername.dreamhost.comtook me to the "/home/username" directory, all my attempts to clone the repo started FROM that location, either by omitting that part of the absolute URL or substituting "~". It NEVER occurred to me to add "/home/username" to the SSH connect string. Odd that the "~" does not work.But thanks to your suggestions, I did find success. Here is what worked:
$ git clone ssh://username@servername.dreamhost.com/home/username/website.com/.gitCloning into 'website.com'...
remote: Counting objects: 5538, done.
remote: Compressing objects: 100% (5270/5270), done.
remote: Total 5538 (delta 621), reused 0 (delta 0)
Receiving objects: 100% (5538/5538), 12.73 MiB | 1.06 MiB/s, done.
Resolving deltas: 100% (621/621), done.
Boom! Took about 15 seconds. Thanks again!
James Sinkiewicz
Drupal Site Builder and Generalist
http://MyDrupalJourney.com
Use a colon and the relative path
I believe the best way (and the least typing) would be:
git clone username@servername.dreamhost.com:website.comWhen you use the username@host format, the SSH protocol is implied. The colon specifies the separation between the host and the path. Since the path doesn't start with a /, it's relative to the user's home directory. Recent versions of git don't mandate that you specify the .git directory.
Hope that helps.
Justin
That also worked
Your suggestion also worked Justin. I must have tried 100 ways to get that clone repo, but not the two suggested. I'm so upset with the time I wasted in my ignorance! LOL
James Sinkiewicz
Drupal Site Builder and Generalist
http://MyDrupalJourney.com