{"thread":{"id":"27040","subject":"New to git","startedAt":"2011-04-08T19:43:09Z","lastAt":"2011-04-09T22:41:05Z","messageCount":6,"participants":["Marco Maggesi","Jeff King","Jonathan Nieder","Dmitry Potapov","Matthieu Moy"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"165443","messageId":"BANLkTimy-95OJGxU9XzcaR=0jTJWXOwsDg@mail.gmail.com","threadId":"27040","inReplyTo":null,"subject":"New to git","fromName":"Marco Maggesi","fromEmail":"marco.maggesi@gmail.com","sentAt":"2011-04-08T19:43:09Z","receivedAt":"2011-04-08T19:43:09Z","isPatch":false,"sender":{"key":"marco.maggesi@gmail.com","avatar":null},"body":"Hi,\nI'm considering to use git to track my sources.\nSo far I was able to use git on a single machine and play with its\nbasic features.\n\nNow I would like to setup a repository on a server and use it as a\ncentral point of distribution for a few other computers.\nAs far as I can understand, the default mechanism for push / pull\nrequires that git is installed on every machine, including the server.\n\nMy problem is that I can hardly install git on the server for several\nreasons that I will not explain here (also I'm not the administrator\nof the server).\nSo I am looking for other solutions.\n\nFor the moment I came only to the following idea: mount the remote\nrepository via fuse-ssh and use the local installation of git to push\n/ pull changes.\nSurely it is inefficient but I don't care too much (my repositories\nare small enough I think).\nCan you see other drawbacks of this solution?\n\nAlso I wonder if other kind of synchronizations are possible (rsync,\nunison, ...).\n\nAre there other obvious solutions that I'm missing?\n\nThanks,\nMarco\n"},{"id":"165449","messageId":"20110408201024.GA15964@sigill.intra.peff.net","threadId":"27040","inReplyTo":"BANLkTimy-95OJGxU9XzcaR=0jTJWXOwsDg@mail.gmail.com","subject":"Re: New to git","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2011-04-08T20:10:25Z","receivedAt":"2011-04-08T20:10:25Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Fri, Apr 08, 2011 at 09:43:09PM +0200, Marco Maggesi wrote:\n\n> Now I would like to setup a repository on a server and use it as a\n> central point of distribution for a few other computers.\n> As far as I can understand, the default mechanism for push / pull\n> requires that git is installed on every machine, including the server.\n\nYes, it's the default, but there are other mechanisms that don't require\nserver support. For example, rsync, and dumb http and ftp support.\nThey're not as efficient, but they do work.\n\nFor pushing, they are not as convenient. The dumb http push support goes\nover DAV, so you must have a DAV server set up. Similarly, the rsync\nsupport does not (as far as I know) do rsync-over-ssh, but expects to\nconnect to the rsync daemon directly.\n\nBut if you are just using the server as a distribution point for a\nsingle repository, it can be much simpler. For example, if you always\njust want to push and overwrite what is on the server (i.e., like a\nmirror), you can just use plain rsync outside of git. To avoid mirror\nlag, you do want to update the objects before the refs. So this:\n\n  LOCAL=/path/to/repo.git\n  REMOTE=server:path/to/repo.git\n  rsync -a $LOCAL/objects/ $REMOTE/objects/\n  rsync -a $LOCAL $REMOTE\n\nwould work. And then expose repo.git on the server via http or ftp, and\nclients can clone directly from it.\n\n> My problem is that I can hardly install git on the server for several\n> reasons that I will not explain here (also I'm not the administrator\n> of the server).\n\nYou didn't list your reasons, so I'll assume they're good. But note that\nyou don't need to be the administrator to accept a git push. You can\nbuild it as a regular user, and have git connect over ssh and run the\nserver side.\n\n> For the moment I came only to the following idea: mount the remote\n> repository via fuse-ssh and use the local installation of git to push\n> / pull changes.\n> Surely it is inefficient but I don't care too much (my repositories\n> are small enough I think).\n> Can you see other drawbacks of this solution?\n\nThat is inefficient, but I think it would work OK. If you are doing\nthat, though, you are probably better off just rsyncing the whole result\nas I showed above. It's less inefficient and easier to set up (if you\nhave rsync on the server, of course).\n\n-Peff\n"},{"id":"165467","messageId":"20110408225127.GA27695@elie","threadId":"27040","inReplyTo":"BANLkTimy-95OJGxU9XzcaR=0jTJWXOwsDg@mail.gmail.com","subject":"Pushing to a \"dumb\" server (Re: New to git)","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2011-04-08T22:54:55Z","receivedAt":"2011-04-08T22:54:55Z","isPatch":false,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Hi,\n\nMarco Maggesi wrote:\n\n> My problem is that I can hardly install git on the server for several\n> reasons that I will not explain here (also I'm not the administrator\n> of the server).\n> So I am looking for other solutions.\n\nHave you looked into \"git bundle\"?\n\nI should also mention that git can be run from ~/bin without trouble.\nIf you lack the ability to modify your $PATH, \"git fetch\" and \"git\npush\" have --upload-pack and --receive-pack options that can be used\nto specify alternate commands like '~/bin/git upload-pack'.\n\nCiao,\nJonathan\n"},{"id":"165497","messageId":"BANLkTikCF7Kv2xVYmr3O_P2t1TAzEFxXiA@mail.gmail.com","threadId":"27040","inReplyTo":"20110408201024.GA15964@sigill.intra.peff.net","subject":"Re: New to git","fromName":"Marco Maggesi","fromEmail":"marco.maggesi@gmail.com","sentAt":"2011-04-09T19:15:54Z","receivedAt":"2011-04-09T19:15:54Z","isPatch":false,"sender":{"key":"marco.maggesi@gmail.com","avatar":null},"body":"Hi Chris and Peff,\n\n2011/4/8 Jeff King <peff@peff.net>:\n> But if you are just using the server as a distribution point for a\n> single repository, it can be much simpler. For example, if you always\n> just want to push and overwrite what is on the server (i.e., like a\n> mirror), you can just use plain rsync outside of git. To avoid mirror\n> lag, you do want to update the objects before the refs. So this:\n>\n>  LOCAL=/path/to/repo.git\n>  REMOTE=server:path/to/repo.git\n>  rsync -a $LOCAL/objects/ $REMOTE/objects/\n>  rsync -a $LOCAL $REMOTE\n>\n> would work. And then expose repo.git on the server via http or ftp, and\n> clients can clone directly from it.\n\nthis is the solution I was looking for (but I where not sure that it worked).\n\n> You didn't list your reasons, so I'll assume they're good. But note that\n> you don't need to be the administrator to accept a git push. You can\n> build it as a regular user, and have git connect over ssh and run the\n> server side.\n\nWell, the server is a very old machine and I didn't find easy to\ncompile git on it because of many missing dependencies (but I didn't\ntry very hard either).  A better solution would be to upgrade the\nserver.  But your solution is perfect meanwhile.\n\nThank you,\nMarco\n"},{"id":"165499","messageId":"BANLkTi=tU8vYMoD9bM9z6fy19OX40FLK=A@mail.gmail.com","threadId":"27040","inReplyTo":"BANLkTikCF7Kv2xVYmr3O_P2t1TAzEFxXiA@mail.gmail.com","subject":"Re: New to git","fromName":"Dmitry Potapov","fromEmail":"dpotapov@gmail.com","sentAt":"2011-04-09T19:35:22Z","receivedAt":"2011-04-09T19:35:22Z","isPatch":false,"sender":{"key":"dpotapov@gmail.com","avatar":"https://avatars.githubusercontent.com/u/6568595?v=4"},"body":"On Sat, Apr 9, 2011 at 11:15 PM, Marco Maggesi <marco.maggesi@gmail.com> wrote:\n>\n> Well, the server is a very old machine and I didn't find easy to\n> compile git on it because of many missing dependencies (but I didn't\n> try very hard either).\n\nSome time ago, I built git on an old machine running Linux (RedHat 8.0\nbut maybe some packages were upgraded). Here is the line that I used:\n\nmake NO_OPENSSL=1 NO_NSEC=1 NO_CURL=1 NO_TCLTK=1 NO_PYTHON=1\n\nI needed git only to push and fetch to that repository, and it worked\nwell for me.\n\nDmitry\n"},{"id":"165504","messageId":"vpqy63joxoe.fsf@bauges.imag.fr","threadId":"27040","inReplyTo":"BANLkTikCF7Kv2xVYmr3O_P2t1TAzEFxXiA@mail.gmail.com","subject":"Re: New to git","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2011-04-09T22:41:05Z","receivedAt":"2011-04-09T22:41:05Z","isPatch":false,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Marco Maggesi <marco.maggesi@gmail.com> writes:\n\n> Hi Chris and Peff,\n>\n> 2011/4/8 Jeff King <peff@peff.net>:\n>> But if you are just using the server as a distribution point for a\n>> single repository, it can be much simpler. For example, if you always\n>> just want to push and overwrite what is on the server (i.e., like a\n>> mirror), you can just use plain rsync outside of git. To avoid mirror\n>> lag, you do want to update the objects before the refs. So this:\n>>\n>>  LOCAL=/path/to/repo.git\n>>  REMOTE=server:path/to/repo.git\n>>  rsync -a $LOCAL/objects/ $REMOTE/objects/\n>>  rsync -a $LOCAL $REMOTE\n>>\n>> would work. And then expose repo.git on the server via http or ftp, and\n>> clients can clone directly from it.\n>\n> this is the solution I was looking for (but I where not sure that it\n> worked).\n\nIt works, but \"git push\" does something that rsync can't: it will refuse\nnon-fast forward, i.e. refuse to override commits that you don't have\nlocally.\n\nSo, I'll just insist on the \"if you are just using the server as a\ndistribution point\" part. If you ever push from two different machines\nto the server with rsync, you'll take the risk of loosing data.\n\nIf the server runs an HTTP server, an alternative is to push over\nWebDAV, it doesn't require Git on the server. It's slow, but safer than\nrsync.\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"}]}