Gitsec POC v1 Backend is a implementation of a Git server that allows clients to interact with Git repositories over HTTP. It is designed to be used as a proof of concept and does not include features such as authentication, SSL/TLS, Git hooks, or repository management.
The Gitsec PoC v1 Backend supports the Git HTTP protocol, which allows clients to fetch and push to repositories over HTTP. This protocol is used by Git clients to communicate with the server and exchange data.
The following Git commands are supported in this version:
git clone
- used to clone a repository from the servergit fetch
- used to retrieve new data from a remote repositorygit push
- used to push data to a remote repositorygit pull
- used to fetch and merge data from a remote repository into the local repository
To use Gitsec POC v1 Backend, you will need to have Go and Make installed on your system. You can then clone the repository and build the server using the following commands:
$ git clone https://github.com/uddugteam/gitsec-backend.git
$ cd gitsec-backend
$ make build
This will build an executable file called gitsec-backend in the project root directory. You can then start the server using the following command:
$ ./gitsec-backend serve
By default, the server will listen on http://localhost:8080 and serve Git repositories from the .repos
directory.
You can change these default values by setting the HTTP_PORT
and GIT_PATH
environment variables, respectively.
For all next command you should replace repo.git with the name of your repository.
To add the server as a remote origin to a local repository, you can use the git remote add command:
$ git remote add origin http://localhost:8080/repos/repo.git
And push commits from local repository to remote one:
$ git push
You can also clone the repository using the git clone command:
$ git clone http://localhost:8080/repos/repo.git
The following environment variables can be used to configure the server:
HTTP_PORT
: The port number on which the server will listen for HTTP requests. Default is8080
GIT_PATH
: The directory where the Git repositories are stored. Default is.repos
make build
: Builds thegitsec-backend
executablemake run
: Runs the server in development mode with race detection enabledmake test
: Runs the tests for the projectmake test-coverage
: Runs the tests for the project and generates a coverage reportmake lint
: Runs the linter to check
- Add support for IPFS storage
- Add support for onchain registry
- Add disaster recovery for repo storage
- Add performance optimisation for IPFS storage
- Add support for SSH protocols
- Add authentication
- Add SSL/TLS support
- Add Git hooks support
To contribute to the Gitsec POC v1 backend, fork the repository and create a pull request with your changes. Make sure to include thorough testing and documentation for your changes.
This project is licensed under the MIT License - see the LICENSE file for details.