2

I am trying to use git and MobileMe as a version control system for a personal project I am working across several computers. So far i have done the following.

Created and empty bare repository on my local computer

$ mkdir myproject.git
$ cd myproject.git
$ git init --bare 
$ git update-server-info

I then copied the myproject.git directory to the mobile me disk, and sync my computer with mobile me.

I then switched to the directory where my project was on my local machine, set the remote origin and try to push the local repository to mobile me

$ cd myproject
$ git remote add origin https://<username>@idisk.me.com/<username>/myproject.git/
$ git push --all

Im am then asked for my password twice. The first time is the mobile me password, any other password gets an error. After entering the second password, and believe me i've tried everything, terminal just hangs. So what am I doing wrong? (Besides trying to use mobileme as a git repository)

Thanks, Ben.

Intentss
  • 8,687
  • 4
  • 48
  • 59

2 Answers2

3

Forget what I tried before, if you want to use your MobileMe iDisk to store a bare repository, it is entirely possible.

The key is that you need to go into your MobileMe preferences, and under the iDisk tab, make sure that iDisk Sync is on, if it's not, start it. This creates a local copy of your iDisk that is accessible under the Volumes directory.

Then create a bare repository the same way you would on any other remote volume

$ cd /Volumes/iDisk
$ git init --bare myProject.git

You can then push/pull to this just as you would any other repository after you have added it as a remote

$ git remote add iDisk /Volumes/iDisk/myProject.git
$ git push iDisk master

To clone the repository, simply

$ git clone /Volumes/iDisk/myProject.git

It should be noted that you need to sync with mobile me before changes will take effect on other computers you are using mobile me with...

-Ben

Intentss
  • 8,687
  • 4
  • 48
  • 59
0

I am not sure you can push through https, unless mobile me has somehow activated the git-http-backend cgi script, in order to better serve the right packfile.

alt text
(source: progit.org)

(See ProGit Book "smart http" section)

GitHub supports that protocol since April 2010, but I don't know about any other host providing that service yet.

Glorfindel
  • 19,729
  • 13
  • 67
  • 91
VonC
  • 1,042,979
  • 435
  • 3,649
  • 4,283
  • @Ben: I have not directly tested that, but I doubt very much that you can push to mobileme through https. Again, aside GitHub, I don't know of other providers supporting that protocol for **write** operations. Mobileme seems an unlikely candidate for that kind of feature... which doesn't exactly fit their core activity. In short, in my opinion, "yes, it is not possible". – VonC Jun 02 '10 at 20:15