gitolite | Hosting git repositories -- Gitolite allows you to setup | DevOps library
kandi X-RAY | gitolite Summary
kandi X-RAY | gitolite Summary
This is a minimal README for gitolite, so you can quickly get started with:. For anything more, you need to look at the complete documentation, at: Please go there for what/why/how, concepts, background, troubleshooting, more details on what is covered here, advanced features not covered here, migration from older gitolite, running gitolite over http (rather than ssh), and many more topics.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of gitolite
gitolite Key Features
gitolite Examples and Code Snippets
Community Discussions
Trending Discussions on gitolite
QUESTION
I am using a git on windows, I can clone a repo but whenever I try to push I get this error "FATAL: unknown git/gitolite command: 'git receive-pack 'p/2025-s2-csharp/tp12-myname'' fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists." I have tried to reclone the repo and to reinstall git but it didn't work. I can still push on the repo from another computer on this repo. Thanks in advance
...ANSWER
Answered 2021-Apr-14 at 07:41I managed to fix this by opening my git config globally with git "config --global --edit" it contained this part "[remote "origin"] receivepack = git receive-pack" I just had to remove it and it fixed it.
QUESTION
I'm new to Git and I am trying to understand the concept. Maybe someone can help me with a few theoretical questions?
So there is a Git on the remote server and a cloned git on my local computer.
After cloning the git to my local computer with a read permission (gitolite with 'R' permission), can I do any damage to the git on the remote server?
If I do a 'git reset --hard
' (I know that there is often a strong advise against it), does this only reset the changes on my local computer or also on the remote server?
Is there a difference if I work with R
or RW+
authorization?
ANSWER
Answered 2021-Feb-07 at 10:21First, Git itself has no notion of 'R' or 'RW+': those are read-write permission managed by gitolite, an authorization layer called through SSH (forced command: the ~git/.ssh/Authorized_keys file calls the gitolite script) or HTTPS.
git reset --hard
is purely a local function, which does involve:
- Git only, not gitolite
- your local repository only, not the remote repository behind Gitolite.
If you were to reset HEAD to a different commit, the only way to push that new HEAD would be through the Git operation git push --force
.
That is where Gitolite comes, with the permission field of the access rules included in the (remote) gitolite-admin repository.
Only an access rule including RW+ would allow you to push --force
.
R
is only for cloning and fetching, it prevents pushing (force or not).
QUESTION
I'm currently in the process of moving a gitolite (3) installation between two servers. Thankfully, this process is pretty well documented on the main project website. However, my repositories makes pretty active use of git-annex which stores data in various remotes as well as on the server itself.
Now, I'm not an expert on git-annex, but I know it works a bit differently from "regular" git, so is there anything one should keep in mind when moving this kind of installation or does it work just as outlined in the gitolite documentation above?
...ANSWER
Answered 2020-Nov-04 at 10:18After quite a bit of research, I couldn't find any details on how this should done on a git-annex enabled repository so I decided to simply try it out. Apparently, the steps as they are written work just fine, even for git-annex content. That said, be cautious as you're moving stuff. Once the new server is ready to take over, make sure the old one is disabled, I don't think the git-annex likes to find 2 identical remotes.
As a minor anecdote: I accidently forgot to chown
/chmod
the repositories but
re-running step 6 and onwards without any issues what-so-ever.
QUESTION
Starting point:
- Ubuntu 20.04
- Gitolite (/home/git/)
- Webspace /var/www/webspace (usually owned by www-data:www-data)
- Git user (in www-data group and also tried without beeing in group)
I want to update the webspace as git user with post-receive to a www-data directory. I had it archived before I installed Gitolite, but it doesn't seem to work the same way as it did before (or I am missing something). To make it clear: post-receive is executed after pushing (which it's normally not on Gitolite) ... was a hard time too to archive that.
Edit: To make it clear: I want to archive that Git and www-data can access and modify the same files.
What Ive tried:
- chmod 777 -R /var/www/webspace (after this git can access but nginx returns with 403?)
- Adding Git-User to www-data group
- chown www-data:git -R /var/www/webspace
- chown git:www-data -R /var/www/webspace
- chown git:git -R /var/www/webspace
- chown www-data:www-data -R /var/www/webspace (with and without git inside group)(with and without 777)
- Executing post-receive manually (Operation not permitted)
- Executing post-receive manually as root (well ... works of course, but thats not the point)
- ... maybe also some steps more which Im maybe missing rn
What Ive noticed so far:
- On the contrary to Git, Gitolite checks the repo out with -rw------ (If i remember correctly), maybe that is why its not working with gitolite but with Git
The code (not that it would be important, but just to list everything):
- post-receive
ANSWER
Answered 2020-Jul-24 at 06:04Try and follow "adding other (non-update) hooks" in order for Gitolite to call the relevant post-receive hook.
add this line in the
rc
file, within the%RC
block, if it's not already present, or uncomment it if it's already present and commented out:
QUESTION
I am trying to clone the gitolite-admin.git repo from my own server after "successfully" installing gitolite (multiple ways: apt-package, github source), but it always gives the same error.
...ANSWER
Answered 2020-Jul-23 at 05:13Check first your ~git/.ssh/authorized_keys
on the Gitolite server: if you want to clone a gitolite-managed repository (including the main gitolite-admin
one), your public key should be:
- listed in that
~git/.ssh/authorized_keys
file, - preceded with the forced-command
command="[path]/gitolite-shell
(as I detail in "How do programs like gitolite work?")
Otherwise, assuming your public key is registered (not for gitolite, just for regular interactive SSH session), then your clone would be:
QUESTION
There are many similar topics (many of them very old) but I am still lost. I have two servers, one has gitolite setup, and another has redmine setup. User is pushing changes to the repository created on gitolite server. Redmine is a user on this gitolite server and is pulling changes from it and showing them in browser.
More precisely, I have used the following line on redmine server:
...ANSWER
Answered 2020-Apr-11 at 15:08The first way that I would choose is to use Redmine + Gitolite integration via dedicated plugin, as explained here:
http://redmine-git-hosting.io/
Second way, is what you have attempted, so:
Pulling the changes via cron job or some other kind of scheduled task is legit thing to do, however then some delay exists between commit and a cron job, and also unnecessary utilization of resources like networking and cpu for testing repository even if there is no change...
In order to properly utilize given resources, a recommended way are hooks, in both Redmine and git server.
So on your gitolite, you need to have post-receive hook, which would perform:
- update of your repo tracked by Redmine (you can do that in multiple ways, one of ways is to use sshpass or to use expect to login into Redmine server and perform git pull of changes)
- trigger the Redmine's repository update hook, which is described here: https://www.redmine.org/projects/redmine/wiki/HowTo_setup_automatic_refresh_of_repositories_in_Redmine_on_commit
So for example, a git's post-receive hook would look like:
QUESTION
I am attempting to use git-multimail with gitolite to email users of updates - it was fairly straightforward to set up following the instructions https://github.com/git-multimail/git-multimail/blob/master/doc/gitolite.rst but I do not want multiple emails to be sent on push, only 1 summary email that appears in the same vein as
...ANSWER
Answered 2020-Apr-21 at 08:00To send just one summary (refchange) email you need to stop multimail
to send commit emails. To configure this you need to disable multimailhook.commitList
: set it to none
or an empty string:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install gitolite
login to "git" on the server
make sure ~/.ssh/authorized_keys is empty or non-existent
make sure your ssh public key from your workstation has been copied as $HOME/YourName.pub
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page