2

I am getting up to speed with Git and Gitolite. I have a server for remote repos that are managed with gitolite. I have a git client that interacts with that. All good so far.

I want to understand the right way to handle the following scenario...

There is a repo out there (e.g.on github) that I would like to clone on to my server so that I can clone it from my server onto my client where I will branch and make changes. I want to then push those changes on to my server. I'd like to also be able to fetch from the upstream repo onto my server. If I later wish to send my changes upstream I'll email a git request-pull from my server.

I can't work out what is the best way to do this with gitolite in the picture. I presume there is syntax required in the gitolite configuration for such a repo but I can't find any examples.

I have found on my searches references to Admin-Defined-Commands which might be the way to do this but it does seem to be a lot of work to implement for someone relatively new to gitolite. Perhaps it is the only and correct way and I will go off and do it. Just asking in case there's a better/simpler way...

Any guidance appreciated, Google not being my friend today...

starfry
  • 9,273
  • 7
  • 66
  • 96

1 Answers1

0

ADC are for ssh commands you want to execute on the Gitolite server without giving a full interactive ssh session to anyone.
And Gitolite is about managing the authorization for collaborating on a given repo stored on your server.

But for a public repo on GitHub?
You don't need Gitolite at all, and can directly fork on GitHub, then clone that repo locally.

Should you absolutely need to get a Gitolite-manage instance of that repo on your Gitolite server, then I would recommend:

  • to initialize everything on your local machine (git clone of the GitHub repo)
  • to declare a new repo in the gitolite.conf of your gitolite-admin repo (and push it back to the Gitolite server, which will trigger the creation of a new repo)
  • git push your local clone of the GitHub repo to your Gitolite server.

Any update from upstream is best managed directly from your local clone, by adding an 'upstream' repote (and push back, if you want, to your Gitolite server)

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • My gitolite managed server is the entity in my setup that is backed up, hence the reason for wanting to push my local changes to it. The way you've suggested I do it is where I ended up in my own thinking so at least you've confirmed my thoughts so thanks for that :) – starfry Apr 07 '12 at 19:14
  • @starfry yes, it is best to do what you need to your local computer, before pushing back to the (Gitolite) server. – VonC Apr 07 '12 at 20:11