git-http-backend | Git Smart HTTP in Go | HTTP library
kandi X-RAY | git-http-backend Summary
kandi X-RAY | git-http-backend Summary
This is a Go based implementation of Grack (a Rack application), which aimed to replace the builtin git-http-backed CGI handler distributed with C Git. Grack was written to allow far more webservers to handle Git smart http requests. The aim of this project is to improve Git smart http performance by utilising the power of Go.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- serviceRpc handles the RPC request .
- Handler returns a http . HandlerFunc that serves the request .
- getInfoRefs returns the refs for a service
- getGitDir returns the absolute path of a file
- Returns true if the request has access to rpc
- gitCommand runs git command
- sendFile is used to send a file
- Get config setting for given service
- getServiceType returns the service type
- init configures flags .
git-http-backend Key Features
git-http-backend Examples and Code Snippets
Community Discussions
Trending Discussions on git-http-backend
QUESTION
I would like to authorize users depending on the requested path. For example, only user1
and user2
should have access to /projects/1
.
My /etc/nginx/.htpasswd
looks like this:
ANSWER
Answered 2022-Jan-18 at 01:58Here is a config I've just tested with OpenResty 1.17.8.2 (based on nginx 1.17.8 core) and can confirm that it is workable:
QUESTION
So far:
I have apache and git-http-backend running on my own (home) server. I can ssh to the server and create a repository. I am able to clone the servers repo locally, make changes and push back to the server.
I am going to create many small projects. On svn I used to have few repositories and the projects were simply subdirectories. svn supported to fetch only subfolders and assume they are projects. In git, I failed to clone from a subfolder, and it appears to me, that a project should be in it's own repository. My question is: How can I create a repository (actually a project) without ssh into the server. (I have ssh only enabled from within my home network, btw.)
I have tried gitweb, but that seems to be a read-only tool. I have tried to "git init --bare https://...", but that interpreted the path as a local relative path.
...ANSWER
Answered 2021-Oct-30 at 20:17If you're just using the standard git-http-backend
command and Apache, then there's no way to automatically create remote repositories over HTTPS. You have to log into the server and create them by hand because Git only serves repositories that exist on the local disk already.
If you're using a tool like Gitolite, you can set up wildcard rules to allow creating repositories automatically by just cloning them.
QUESTION
I am trying to setup a git server with stagit
for the front end, git-http-backend
for the back and using nginx
between everything. I've found a config that works on my server in this answer (and by works, I mean nginx will serve html to any connection through a web browser, but lets me clone a repository if I use git clone https://git.website.com/test.git
.
The problem I'm having, is that when I push this repository (whether that be from the server itself, or from my local computer) with an origin of https://git.website.com/test.git
I receive a 403 error and I'm not sure why. Any ideas?
ANSWER
Answered 2020-Sep-05 at 12:31After much trial and error I've taken the config from this answer and modified it to give me the following location rules:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install git-http-backend
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