Project management and code hosting application. Follow us on twitter @pgitlab
Ruby CSS CoffeeScript JavaScript Shell
Pull request Compare This branch is 115 commits ahead, 7 commits behind gitlabhq:6-1-stable.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app
config
db
doc
features
lib
log
pgl
public
script
spec
tmp
vendor
.foreman
.gitignore
.rspec
.simplecov
.travis.yml
CHANGELOG
CONTRIBUTING.md
Gemfile
Gemfile.lock
Guardfile
LICENSE
MAINTENANCE.md
PROCESS.md
Procfile
README.md
ROADMAP.md
Rakefile
VERSION
config.ru

README.md

The main GitLab project supports public projects now.

This project is no longer supported.

Public GitLab

Presentation

Public GitLab is a fork of the official GitLab software. This fork allows you to host public repositories as long as official software does NOT support it (e.g. for Open Source projects). With this fork, I'm trying to reproduce Github behaviour.

So by public I mean:

  • Allow anonymous users to browse your public repositories.
  • Allow anonymous users to download your code (not only by git clone).
  • Allow anonymous users to register and report issues on public projects.

With these features, GitLab can be a self-hosted Github competitor.

You can browse a live example at http://git.hoa.ro (you won't be able to create projects).

Disclaimer: I do not provide any support on GitLab itself. I only contribute to the public part. Please refer to the official documentation for any help on GitLab itself.

You should also be aware that Public GitLab only applies to the latest stable release branch of GitLab. So, use the *-stable branches! The master branch on this repo has a high chance to be broken.

Changelog

  • [2013-11-23] : GitLab now supports public mode. Follow this migration guide to clean up your database and files, and get back to the official repository. This fork will no longer be supported (except for migration support, of course).

And again, thank you everyone for your support about this fork, it has been a pleasure to work on it.

Note: Follow @PGitLab to get news on the project (or RSS feed here).

  • [2013-07-29] : Fixes 2 issues (more at #22)
  • [2013-07-24] : Public GitLab supports GitLab 5.4 (stable) - Upgrade 5.3 to 5.4
  • [2013-07-06] : New feature ! Added a different projects number limit per user for private and public projects. Thanks to Mike for the idea.

Please update your DB model to use it ( bundle exec rake db:migrate RAILS_ENV=production ). Warning: New option in config/gitlab.yml.example (default_projects_limit_private).

Warning: GitLab 5.1 does not work properly with old version of Git (ok on 1.7.10+). More here.

  • [2013-04-11] : MySQL support
  • [2013-04-01] : First commit for Public GitLab (only PostgreSQL)

Installation

During the official installation workflow, Public GitLab override part "6. GitLab - Clone the Source".

Warning: Remember that you need to use the latest stable branch, even if you want to download it from zip file.

Note: You can also use my GitLab install scripts for CentOS.

Clone the Source

# Clone GitLab repository
sudo -u git -H git clone https://github.com/ArthurHoaro/Public-GitLab.git gitlab

# Go to gitlab dir
cd /home/git/gitlab

# Checkout to stable release
sudo -u git -H git checkout 6-1-stable

Post installation

At this point, all of the GitLab components are installed. You still can't access GitLab though.

The SQL script below creates a default guest user for anonymous access. It also creates a default team (pgl_reporters), giving reporter permission to all future users for all public projects.

Note that your DB user needs to have the TRIGGER permission on your database (this is specific to Public GitLab).

PostgreSQL

You have to patch your GitLab database with 2 SQL scripts:

cd /home/git/gitlab/pgl
psql -h host -U user database < pgl_pgsql_insert.sql
psql -h host -U user database < pgl_pgsql_trigger.sql

MySQL

You have to patch your GitLab database with 2 SQL scripts:

cd /home/git/gitlab/pgl
mysql -hhost -uuser -p
use database
source pgl_mysql_insert.sql
source pgl_mysql_trigger.sql

Allow signup

In the file ~/gitlab/config/gitlab.yml, uncomment:

signup_enabled: true

Note: Keep in mind that if you do not allow signups, guests won't be able to report issues.

If you do not want guest users to create projects on your GitLab installation, set default_projects_limit: 0 in config/gitlab.yaml.

Restart GitLab

Remember to restart GitLab after all these changes :

sudo /etc/init.d/gitlab restart

Then enjoy !

Update Public GitLab

You need to refer to official update guides to upgrade GitLab version.

If the changelog on this README indicates any SQL update, you need to update your database :

PostgreSQL:

 cd /home/git/gitlab/pgl
 psql -h host -U user database < pgl_pgsql_trigger.sql

MySQL:

cd /home/git/gitlab/pgl
mysql -hhost -uuser -p
use database
source pgl_mysql_trigger.sql

Reporting issues

See CONTRIBUTING.

If there is a new stable branch, please do not open an issue to ask for an update. Contact me instead.

Troubleshooting

Removing root user

The reporters team created by Public GitLab is owned by the root user (Administrator). If you delete this user, it will cause problems in your GitLab installation.

If you really need to remove root, you need to change the pgl_reporters team's owner in GitLab administration before deleting it.

If you have already deleted the root user, you have to manually change Public GitLab SQL insert to :

INSERT INTO user_teams (name, path, owner_id, created_at, updated_at, description) 
VALUES ('pgl_reporters', 'pgl_reporters', (SELECT id FROM users WHERE username = 'YOU_NEW_ADMIN_USERNAME'), now(), now(), 'Default new users team (reporter permission)'); 

Read more at issues #3 and #4.

Styles don't apply properly

I had an issue with styles while upgrading from 5.4 to 6.0, so if it can help, here is what to do :

  • Stop your Public-GitLab instance.
  • Execute :
RAILS_ENV=production bundle exec rake assets:clean
RAILS_ENV=production bundle exec rake assets:precompile
  • Restart your Public-GitLab instance.

License

Public GitLab is provided and maintained by Arthur Hoaro.

Public GitLab is distributed under the same license as the original software.

This fork is based on cjdelisle work, from his original fork.