GithubHelp home page GithubHelp logo

klaussilveira / gitlist Goto Github PK

View Code? Open in Web Editor NEW
2.9K 155.0 520.0 4.15 MB

An elegant and modern git repository viewer

Home Page: https://gitlist.org/

License: BSD 3-Clause "New" or "Revised" License

PHP 86.18% Makefile 0.60% JavaScript 2.24% Twig 8.60% SCSS 2.10% Dockerfile 0.27%
gitlist git repository-management php

gitlist's Introduction

GitList: an elegant git repository viewer

Build Status GitHub release License Crowdin

GitList is an elegant and modern web interface for interacting with multiple git repositories. It allows you to browse repositories using your favorite browser, viewing files under different revisions, commit history, diffs. It also generates RSS/Atom feeds for each repository, allowing you to stay up-to-date with the latest changes anytime, anywhere. GitList was written in PHP, on top of the Symfony framework and powered by the Twig template engine. This means that GitList is easy to install and easy to customize. Also, the GitList interface was made possible due to Bootstrap.

Features

  • Multiple repository support
  • Multiple branch support
  • Multiple tag support
  • Commit history, blame, diff
  • RSS/Atom feeds
  • Syntax highlighting via CodeMirror or Ace
  • Repository statistics

Screenshots

Requirements

In order to run GitList on your server, you'll need:

  • PHP 8.1
  • git 2
  • Webserver (Apache, nginx)

Installation

  • Download the latest release or the nightly build and decompress to your /var/www/gitlist folder, or anywhere else you want to place GitList.
    • Do not use the source release, or download a branch or tag from GitHub. It is not suited for end-users, only development.
  • Open up the config/config.yml and configure your installation. You'll have to provide where your repositories are located.
    • Alternatively, you can export the environment variable DEFAULT_REPOSITORY_DIR with the directory containing your repositories
  • Create the cache and log folder and give it read/write permissions to your web server user:
cd /var/www/gitlist
mkdir -p var/cache
chmod 777 var/cache
mkdir -p var/log
chmod 777 var/log
  • Point your webserver to the /var/www/gitlist/public folder, where index.php is.

That's it, installation complete! If you're having problems, check the Troubleshooting page.

Development

GitList comes with a Docker Compose configuration intended for development purposes. It contains a PHP image with all necessary extensions, as well as a Node image for frontend assets.

To get started, just clone the repo and run the setup script:

git clone https://github.com/klaussilveira/gitlist.git
make setup

It should take care of letting you know what is missing, if anything. Once finished, run the test suite to make sure everything is in order:

make test
make acceptance

There are other commands available. To learn more:

make help

Contributing

If you are a developer, we need your help. GitList is small, but we have lots of stuff to do. Some developers are contributing with new features, others with bug fixes. But you can also dedicate yourself to refactoring the current codebase and improving what we already have. This is very important, we want GitList to be a state-of-the-art application, and we need your help for that.

  • Stay tuned to possible bugs, suboptimal code, duplicated code, overcomplicated expressions and unused code
  • Improve the test coverage by creating unit and functional tests

If you are not a developer, you can also contribute by helping translate GitList.

Further information

If you want to know more about customizing GitList, check the Customization page on the wiki. Also, if you're having problems with GitList, check the Troubleshooting page. Don't forget to report issues and suggest new features! :)

Legacy

GitList was born in May 2012, a time were Composer was still a novelty and Silex was all the rage. We have tried to maintain GitList as-is for as long as possible, but the PHP ecosystem changed so much in all those years that it became too time consuming to maintain it. Thus, 2.0 was born on top of Symfony 6 and we'll keep moving with the times.

Legacy, however, is still available here and we will try to keep it secure and working on newer PHP versions.

gitlist's People

Contributors

alehaa avatar attiks avatar bggo avatar bjoernffm avatar cleverer avatar cschorn avatar damndam avatar danielgtaylor avatar fabpot avatar fauxpark avatar fredlawl avatar garygreen avatar gromnan avatar hologos avatar jblond avatar khornberg avatar klaussilveira avatar lukx avatar lupul avatar mikedld avatar mprochowski avatar nateeag avatar reallinfo avatar siburny avatar simonharris avatar skwashd avatar sstok avatar tobya avatar vognev avatar wimrijnders avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gitlist's Issues

Blame not intermixing changes

Looking at the blame history on a file, it looks like my install is listing all portions of the file from commit A, and then all changes from commit B, and then changes from C, and so on.

I was expecting that the file would be as is in it's current form with the list of commits in the left column updating as appropriate per line (As the 'git blame filename' output shows).

RSS Feed failing to list branch specific commits

When viewing the RSS feed for a branch, all branches appear to show the commit log for the master branch.

While viewing the file listing, I select the link to the RSS feed. This gives me this page:
http://.../git/testing.git/master/rss/

I then select a different branch and get it's RSS feed. I repeat this for a few branches
http://.../git/testing.git/Branch1/rss/
http://.../git/testing.git/Branch2/rss/
http://.../git/testing.git/Branch3/rss/

In spite of branch specific commits, all 4 RSS feeds are showing the commit list for the master branch.

Running May 23 pull of Gitlist on Fedora 16 and using Gitolite for access control (assumed to be configured correctly).

Oops! No route found for "GET /test.git/tree/master/"

Hi,

overview is working fine but when i try to see a project

I get this

Oops! No route found for "GET test.git/tree/master/"

both non and bare repo are giving the same error

i

git clone git://github.com/kulbirsaini/intelligentmirror.git

and i got the same error

php 5.3.3

[Bug] Pagination Newer Commits Link

If the number of commits in a repo is 13. Then the pageNumber will be zero and lastPage will be 1 and since pageNumber != lastPage, the Newer link will be shown. I guess you need to use intval instead of round PHP function.

Viewing merge commits generating error

When attemtping to view commits documenting branch merges I am getting the following error

Oops! No commit log available

I can view the commits that were merged over, but the actual commit of the merge is causing the issue.

Env:
Gitolite for admin/creation
Fedora 16
Git 1.7.7.6

White screen at startup

I use this vhosts file in debian linux.

<VirtualHost *:80>
DocumentRoot /htdocs/tools/gitlist
ServerName gitlist.myurl.net
ErrorLog "/htdocs/tools/logs/gitlist_error.log"
CustomLog "/htdocs/tools/logs/gitlist_access.log" combined

<Directory "/htdocs/tools/gitlist">
AllowOverride All

config.php
[git]
client = '/usr/bin/git' ; Your git executable path
repositories = '/home/git/' ; Path to your repositories (with ending slash)

[app]
baseurl = 'http://gitlist.myurl.net' ; Base URL of the application (without ending slash)

As I understood when I add an echo "1"; after this line it wont show up:
require_once DIR.'/vendor/silex.phar';

Does this require something, I dont even get any errors when I check the logs.

/Marcus

DirectoryIterator fails when the repositories folder no exists

When you configure config.ini you can misspell or forget to create the repositories folder.

Then you get:

Oops! DirectoryIterator::__construct(/home/someuser/repos/) [directoryiterator.--construct]: failed to open dir: No such file or directory

It should show a proper warning like "You should create the repositories folder at /home/someuser/repos/" or directly create the folder it is possible.

failed to open stream on description files

I install gitolite. It creates a default testing.git repository empty.

On index when it is listed:

 PHP Warning:  file_get_contents(/myuser/repositories/testing.git/description) [function.file-get-contents]: failed to open stream: No such file or directory in /mypath/gitlist/lib/Git/Client.php on line 84

So it shows only a warning when the description file no exists. When I create the description file, the warning is gone, but it shouldn't complain about if the description file don't exist.

commits won't display on bare repo

I'm not entirely sure if I am right:
it seems that the commits won't display when a repo is initialized with --bare

(I have a setup where gitlist is behind .htaccess auth and I use git-daemon to edit my repo's centrally (firewall allows only local trafic)).

exclude .ssh directory

When I specify the path like "/home/user/",
gitlist shows such error
”Oops! DirectoryIterator::__construct(/home/user/.ssh) [directoryiterator.--construct]: failed to open dir: Permission denied”.

Can I exclude .ssh directory?

Add search

It would be nice to search the code and/or commit logs.

Commits tab throwing git rev-list usage error

Hi,

I just pulled the last commit to my GitList installation and the Commits tab isn't working anymore (i.e. /gitlist/{Repo}/commits/master) and throws the following error:

Oops! usage: git rev-list [OPTION] ... [ -- paths... ] limiting output: --max-count=nr --max-age=epoch --min-age=epoch --sparse --no-merges --remove-empty --all --branches --tags --remotes --stdin --quiet ordering output: --topo-order --date-order --reverse formatting output: --parents --children --objects | --objects-edge --unpacked --header | --pretty --abbrev=nr | --no-abbrev --abbrev-commit --left-right special purpose: --bisect --bisect-vars --bisect-all

Maybe I'm doing something wrong, but I remember this feature working correctly before getting the latest code from the master origin.

Thanks!

Requesting the ability to ignore select repositories

There are times when an admin might not want select repositories to be displayed in GitList's listing. Specifically I'm thinking of Gitolite and Gitosis that may have user information that one might not wish publically available, but I do not mean to limit the scope of this request to just them.

For example, my set up uses Gitolite to control access. New repo's are created through Gitolite who places them in the same repo dir that it currently is in. Granted, there might be a way for me to configure gitolite to create new repo's in a different dir (I haven't looked), but there may not be times that is an option.

No idea what the best way to do this might be, and I'm in no need of it at this time, but I figured it should be documented so it might be considered.

Not working full on WAMP

I have GitList setup on WAMP, it's showing the initial directory with my .git repo list. I click on a repo and it doesn't list any of the files, commits, or stats. I've tried changing the Client= setting in the config to everything I can think of. Anyone have any ideas?

Can't view commits & stats of non-master branches

While viewing the 'master' branch, I can browse files, commits, stats, etc.

If I switch to another branch, I can still browse files, but once I attempt to view commits, it switches me back to the master branch. If I browse to the commit directly (ie: type the commit into the url) I can bring it up, so they can be viewed (when entered manually and viewed directly), but I can't bring them up in a list of any form.

Twig Timezone Error

When viewing commits, Twig reports a timezone error:

Oops! DateTime::__construct() [datetime.--construct]: It is not safe to rely on the system's timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead

It can be fixed by adding the following to the top of "index.php":

date_default_timezone_set("timezone_identifier_string");

Wrong git binary autodetection path on php

I have to symlink my php binary to a unexistand location because the class Git Client initialize the path wrongly for git binary. And my config is:

cat config.ini
[git]
client = '/usr/local/bin/git' ; Your git executable path
repositories = '/mypath/repositories/' ; Path to your repositories (with ending slash)

[app]
baseurl = 'http://mydomain.com/gitlist' ; Base URL of the application (without ending slash)

My binary is on:

which php
/usr/local/bin/php

But it search on /usr/local/php/bin/git so I have to do:

mkdir -p /usr/local/php/bin
ln -s /usr/local/bin/git /usr/local/php/bin/git

So probably the set_include_path is wrongly or it needs some fix for right detection of git binary.

Fatal error with repos without a master branch

When I can click over the testing.git repo installed via gitolite.

And the lib/Git/Repository.php is invoked with the command:

ls-tree -l master

As I said it is a empty repository, so there are not a master branch to show and it shows the message:

"Oops! fatal: Not a valid object name master"

The output "Not a valid object name master" is the same produced by "git ls-tree -l master"

I think that the right behaviour should be detect the presence of a master branch and show a message (no fatal) like "This repository is empty without a master branch" (more useful message for normal user).

Large Commits cause out of memory errors

After a push of many many many files (some new, some modified), i checked gitlist to look at the commit. After pressing the button to view the commit information, my browser returns a page stating that it cannot find the page http://z.y.x.w/git/repo.git/commit/579d307

Checking the httpd error log I see:

[Thu May 31 18:04:54 2012] [error] [client d.c.b.a]
PHP Fatal error:
Allowed memory size of 134217728 bytes exhausted (tried to allocate 32 bytes) in
/var/www/html/git/lib/Git/Repository.php on line 325,
referer: http://z.y.x.w/git/repo.git/commits/master

checking the other commits, small commits (changing only a few files) appear to display fine. The initial check in of 11,000+ files, however, also displays this same behavior and error

Support syntax highlighting for custom extensions

Syntax highlighting is only working for known extensions, I had a look at lib/Application/Utils.php - getFileType but it defaults to 'text' for all unknown extensions, is it possible to add an array to config.ini so we can define/override custom extension mapping.

Use case: Drupal uses .module, .inc, .install for PHP as well

I solved it for now by changing views/file.twig to treat 'text' as PHP

Pagination for Commits Page

For large projects like Linux or Libreoffice, all the commits can't be displayed on a single page. It eats up all the CPU while loading the commits and most of the times the process is killed by the system. Is it possible to pagniate commits to reduce load on web server and make things more readable?

Foldernames with spaces not handled correctly

Not sure if you wanted this in a new bug report or not, I apologize if this is the wrong place:

Thanks for the fix for the filenames with spaces, that appears to be fixed, however folders with spaces are still not being handled correctly. They now show the full name, but when you click, you get the error:

"Oops! fatal: Not a valid object name master:Test", the folder name being "Test Folder". Looks like it's still trying to use the truncated name.

Filenames with spaces not handled correctly

Cloning down from master today, we (myself and a fellow employee, whose repo we were looking at) noticed that filenames which contain spaces are getting their names truncated after the first space in the file list view. As a test, I created a file with the name "Test File" and committed/pushed, and it shows up in the list as "Test". The file still shows the correct size, but when you click to view the contents, it's blank showing one empty line.

preg_match(): Compilation failed: missing )

I am having an issue while trying to view the contents of a repository.
The overview is working fine, but when I select a repository, I get this:
Several of these: Warning: preg_match(): Compilation failed: missing ) at offset 67 in
and: Warning: preg_match(): Compilation failed: unmatched parentheses at offset 70 in

And finally a: Oops! No route found for "GET /Mygitrepo/tree/master/"

What is going on here???

Thanks in advance!

support for zip/tarball of branches

I would love a function that allows to download zip and/or tarballs of a branch. (similiar to gitweb + github)

thank you guys for developing gitlist, its purely awesome!

Adding empty directory

My commit reads like this :


commit c284ff765f3f6032bf72f18e8ae82c19ec3dea2f
Author: Me
Date: Mon Jun 4 10:11:52 2012 -0400

Need to check in an empty dir

diff --git a/folderA/folderB/folderC/.gitignore b/folderA/folderB/folderC/.gitignore
new file mode 100644

index 0000000..e69de29

In gitlist, viewing the commit shows the author, time, cmmit, and file count correctly, but in the file list, I just get the icon of a file with the index info and no file name or anything of the sort. The diff just shows "new file mode...." (as the file is empty)

Path configuration on Windows

I have installed gitlist and that works fine for displaying the list of repositories, however I get a 404 whenever I click on any of them.

I'm running WAMPserver and the error is "The requested URL /gitlist/test_repo was not found on this server."

[git]
client = 'C:\Progra~1\git\bin\git.exe' ; Your git executable path
repositories = 'C:\wamp\www' ; Path to your repositories
[app]
baseurl = 'http://localhost/gitlist' ; Base URL of the application

My test repository is in "c:\wamp\www\test_repo" and webroot is "c:\wamp\www"

I have tried following the aliasing bits in this ticket, but that hasn't worked either.
#6

Any assistance is greatly appreciated!

Fatal error when a empty repo is accesed without a master branch

This is report for several bug/issues related.

I install gitolite. It creates a default testing.git repository empty.

On index when it is listed:

 PHP Warning:  file_get_contents(/myuser/repositories/testing.git/description) [function.file-get-contents]: failed to open stream: No such file or directory in /mypath/gitlist/lib/Git/Client.php on line 84

So it shows only a warning when the description file no exists. When I create the description file, the warning is gone, but it shouldn't complain about if the description file don't exist.

Another issue:

Then I can click over the testing.git repo.

And the lib/Git/Repository.php is invoked with the command:

ls-tree -l master

As I said it is a empty repository, so there are not a master branch to show and it shows the message:

"Oops! fatal: Not a valid object name master"

I think that the right behaviour should be detect the presence of a master branch and show a message (no fatal) like "This repository is empty without a master branch" (more useful message for normal user).

Also, the third issue, I have to symlink my php binary to a unexistand location because the class Git Client initialize the path wrongly for git binary. And my config is:

cat config.ini
[git]
client = '/usr/local/bin/git' ; Your git executable path
repositories = '/mypath/repositories/' ; Path to your repositories (with ending slash)

[app]
baseurl = 'http://mydomain.com/gitlist' ; Base URL of the application (without ending slash)

My binary is on:

which php
/usr/local/bin/php

But it search on /usr/local/php/bin/git so I have to do:

mkdir -p /usr/local/php/bin
ln -s /usr/local/bin/git /usr/local/php/bin/git

So probably the set_include_path is wrongly or it needs some fix for right detection of git binary.

Recursive scanning

Would be nice if repositories in sub folders would be displayed too.
I have many repositories in different folders (2nd, 3rd level). They aren't all placed at the root.

Undefined variables listing commits

Entering to http://somedomain.com/mygitrepo/commits/master

Warning: Invalid argument supplied for foreach() in /somepath/gitlist/lib/Git/Repository.php on line 262

Notice: Undefined variable: commits in /somepath/gitlist/lib/Git/Repository.php on line 269

Warning: Invalid argument supplied for foreach() in /somepath/gitlist/controllers/commitController.php on line 8

Notice: Undefined variable: categorized in /somepath/gitlist/controllers/commitController.php on line 22

This is mainly produced for empty vars not checked previouly on foreach.

It should use if(!empty($something)) foreach(bla bla)

error 500 after git pull

I've updated from master branch to most recents commit and now gitlist doesn't run anymore,.. error 500 is returned,..
should I to do something special after pulling repo? I've seen that a lot of commits & changes on gitlist.

gitlist on Windows

If I install msysgit I get all the git and bash functionality that seems to be needed for gitlist, but whatever I set in the config ini file, I get a bash error:

  • Oops! 'wc' is not recognized as an internal or external command, operable program or batch file.

I tried setting

  • client = '"c:/Program Files/Git/bin/git.exe"';

which recognizes git, but it seems that the piping (ie. " | wc") is too much for the proc_open in the Client.php.

I have tried using cmd magic also, without luck:

  • client = 'cmd /c "c:/Program Files/Git/bin/git.exe"';

Did anyone succeed running gitlist on Windows?

Thanks,
Lőrinc

ev/null

The deleted files in diff are called ev/null
Greets,
Mariusz Wojcik

[Req] Password-protected Repos

Hey! I just learned about Gitlist, it was incredibly easy to set up and I wanted to use at $DayJob, however the Boss is obviously concerned about the security, so I was wondering if some sort of user/password setup was in the roadmap for this project. This wouldn't be used to protect the actual git repo, just to display the stuff via web.

Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.