简体   繁体   中英

Gitolite forked repo

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 (egon 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...

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)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM