asim / git-http-backend Goto Github PK
View Code? Open in Web Editor NEWGit Smart HTTP in Go
Git Smart HTTP in Go
I'm currently evaluating the program. I still have questions about this:
Access to the repositories should be restricted to a specific group of users.
With the CGI script in combination with Apache, I create a .htaccess file with the users and passwords.
Where do I have to save the users and passwords here?
With which parameters do I have to start the program?
Hey!
We've built something similar for Gitorious few years ago: https://github.com/gitorious/git-http-multi-backend
Not sure if that's useful to you, but if it is then feel free to steal some code ;)
I use this tool for git clone, which met a bug:
$ git-http-backend --project_root=. --git_bin_path=/home/adl/git/bin-wrappers/git
$ git clone http://localhost:8080/mono-repo.git
Cloning into 'mono-repo'...
fatal: expected flush after ref listing
system: Linux adl 6.0.8-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 10 Nov 2022 21:14:24 +0000 x86_64 GNU/Linux
git version: 2.38.1
Current http backend not support git partial clone, can support it? Thanks
Go mod is complaining that the version isn't found because... who knows, but I suspect that this can be fixed by switching to a tag :)
AuthUserEnvVar and AuthPassEnvVar were originally introduced for delegating auth user and password to ssh process environment. (#6, 5f54a8f)
e.g.
$ git-http-backend -auth_user_env_var=AUTH_USERNAME -auth_pass_env_var=AUTH_PASSWORD
and when a user accesses with user:foo, password:bar, then
AUTH_USERNAME=foo AUTH_PASSWORD=bar git ...
However, #17 introduced Basic Auth mechanism and utilize AuthUserEnvVar and AuthPassEnvVar for accepting user name and password.
If an operator starts with:
$ git-http-backend -auth_user_env_var=foo -auth_pass_env_var=bar -require_auth
then, only the user whose name is 'foo' and whose password is 'bar' is accepted, that's fine.
But this setting also enables "delegating auth info" feature above, then from the perspective of the git process, following environments are passed.
foo=foo bar=bar git ...
It's quite meaningless.
How about making different parameter for these two contexts?
Would be great if we could pass in a Logger somehow to perform logging. This would allow users of the library to change the logging to match what they have within their applications.
The alternative is setting the standard logger via:
import "log"
...
log.SetFlags(0)
log.SetOutput(someLogger)
But the log output doesn't contain a level at that point because of the log.Printf
calls (so I guess it would also be nice to change those to something that is a level...).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.