Skip to content

mcka-dev/GitWebAdmin

Repository files navigation

Git WebAdmin

This is a simple Git WebAdmin tool.

Adaptive web design. Git WebAdmin

Requirements

Apache >= 2.0
Apache mod_rewrite
PHP >= 5.4

Open source projects used:

Application Settings

config.ini

[git]
repositories[] = '/home/git/repositories' ; Path to your repositories
; repositories[] = '/home/repositories2' ; If you wish to add more repositories, just add a new line
; repositories[] = 'C:\Path\to\Repos' ; Path for Windows

links['/home/git/repositories'] = 'http://localhost' ; External links to the repository
; links['/home/repositories2'] = 'http://cgit.localhost/git' ; External links to the repository

Set File Permissions

Make file executable:

sudo chmod +x git-init.sh
sudo chmod +x git-rm.sh

To ensure correct access rights to the repository, the entire folder repositories/ should be owned by www-data or a user member of www-data group.

sudo chown -R www-data:www-data /home/git/repositories

Screenshot

Git WebAdmin Screenshot Create Git WebAdmin Screenshot Delete Git WebAdmin Two Repository

REST requests:

curl -X POST --data "repo_name=newrepo.git" http://localhost/admin/create
{"status":"success","message":"Initialized empty Git repository in /home/repositories/newrepo.git"}
curl http://localhost/admin/list
{"/home/repositories":["newrepo.git"]}
curl -X POST --data "repository=/home/repositories&repo_name=newrepo.git" http://localhost/admin/delete
{"status":"success","message":"Repository successfully deleted!"}

TODO:

  • Rename/move repo
  • Show description

License

Code released under the MIT License