Feature/https #1016

Merged
merged 5 commits into from Jun 29, 2012

2 participants

@SaitoWu

Implements Smart HTTP Support for Gitlab.

U can git clone http://localhost/git/repo.git now!

Also support protected branches.

Use a gem from my github repo SaitoWu/grack.git, we can fork a Gitlab version for stable.

Need review and Discuss.

@randx
GitLab member

@SaitoWu forked. Update code please

@SaitoWu

updated!

@SaitoWu

Grack also has a wiki page: https://github.com/SaitoWu/grack/wiki

@randx
GitLab member

i've copied wiki home page

@randx randx merged commit 9eb0190 into gitlabhq:master Jun 29, 2012
@randx
GitLab member

great. thank you :)

@randx
GitLab member

got some errors trying to access project via web like https://dev.gitlabhq.com/projectname



NoMethodError (undefined method `valid_password?' for nil:NilClass):
  config/initializers/grack_auth.rb:8:in `valid?'

@randx
GitLab member

btw cloning works great!!!


git clone https://dev.gitlabhq.com/git/zzz.git
Cloning into zzz...
Username: 
Password: 
remote: Counting objects: 15000, done.
remote: Compressing objects: 100% (7261/7261), done.
remote: Total 15000 (delta 11151), reused 10257 (delta 7537)
Receiving objects: 100% (15000/15000), 11.93 MiB | 695 KiB/s, done.
Resolving deltas: 100% (11151/11151), done.
@SaitoWu

@randx I've already tested view via web. It works for me ..

And grack is mounted at /git. seems like it will not effect the path like https://dev.gitlabhq.com/projectname, if the projectname != git

@randx
GitLab member

@SaitoWu it works great for projectname but falls on gitlab, gitlab_site.. etc

@SaitoWu

@randx got it! i'll fix it soon.

@SaitoWu

@randx Is this a rails issue?

I mounted grack in /git, but rails matches it with /git*

Also, U can got same issue on /info/resque, it will matches /info/resque*

As i know, the new rails router can't set anchor like ^ or $ on the matcher.

Did u have any solutions?

@randx
GitLab member

we dont allow for projects to start from . so lets change it to
:at => "/.git" оr something like this

@SaitoWu
user = User.find_by_email(email)
return false unless user.valid_password?(password)

the second line has a NPE. need a try method.

i'll fix it.

U mean git clone http://localhost/.git/webx.git ? it's a little bit weird.

@randx
GitLab member

even a /git is a bit wierd. Its cool to have http://localhost/webx.git

@SaitoWu

Agree!.

I need to investigate the Rails router.

need some time...

@SaitoWu

A new PR has been send.

Works with http://localhost/webx.git now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment