#7134 Forking on forge-allura.apache.org should work

forge-apr-4
closed
Cory Johns
asf (29)
General
4
2014-03-27
2014-02-05
Dave Brondsema
No

Users should be able to fork https://forge-allura.apache.org/p/allura/git/ Currently you can make a fork, but there's no way to get your code or to push it back. The 'allura' project on our server there is basically a readonly copy with pointers to https://git-wip-us.apache.org/repos/asf?p=incubator-allura.git

For forks (and any other type of local project on the server) to work, we could run git services on the allura-vm host. And probably need some code/config changes to support having a different checkout URL for the 'allura' repo vs other repos.

Related

Chat: 533330ec0594ca2901cf9df9
Chat: 533330ec0594ca2901cf9dfc
Chat: 533498b00594ca2901cf9eb0
Chat: 533498b00594ca2901cf9eb3
Chat: 533498b10594ca2901cf9eb6
Chat: 533498b10594ca2901cf9eb9
Chat: 533498b10594ca2901cf9ebc
Chat: 533498b10594ca2901cf9ebf
Chat: 533498b10594ca2901cf9ec2
Chat: 533498b10594ca2901cf9ec5

Discussion

  • Cory Johns
    Cory Johns
    2014-03-17

    The git server is set up in Apache so you can now do anonymous clones of the repos, but pushing back up is disabled until we resolve [#6701]

     

    Related

    Tickets: #6701

  • Cory Johns
    Cory Johns
    2014-03-20

    allura:cj/7134

    Added a config option to override the clone URL template

     
  • Dave Brondsema
    Dave Brondsema
    2014-03-26

    I initially thought this would be something only set by site admins, not individual projects, since the use-case is pretty small and it could introduce confusion. But perhaps it would be a useful general feature.

    I get AttributeError: clone_url on existing tools with the new code.

    The dialog should explain more of what this setting will do, especially since the average project probably won't need it. Something about overriding the remote URL for the checkout command that is displayed, and you only want to do this if you're mirroring a repo onto SITE NAME.

    SVN tools already have an admin option to control a portion of the checkout URL (i.e. "trunk" or something). While it does seem that these two options work out ok (the new one overrides the prior) it might be nice if they could be either be combined or differentiated. I'd probably keep them separate I guess, since they serve separate purposes, but put more explanatory text on the prior option so that is more easily understood too.

    ForgeHg tests need a trivial update too, specifically: forgehg.tests.test_hg_app:TestHgApp.test_admin_menu

     
  • Cory Johns
    Cory Johns
    2014-03-26

    allura:cj/7134 (force-pushed)
    forgehg:cj/7134

    Fixed AttributeError, refactored to all use Checkout URL dialog, added explanation, and added tests to ForgeHg.

     
  • Dave Brondsema
    Dave Brondsema
    2014-03-27

    Looking real nice. I like how they SVN config options are a single dialog now. Sending back to add validation on the URL and SVN path inputs, so that project admins can only enter a URL (any protocl) and path, respectively.

     
  • Cory Johns
    Cory Johns
    2014-03-27

    allura:cj/7134 (rebased and force-pushed)
    forgehg:cj/7134 (not updated)

    Added validation.

     
  • Cory Johns
    Cory Johns
    2014-03-27

    Config for forge-allura.apache.org to enable auth for SCM:

    In /etc/apache2/sites-available/allura add the following to both VirtualHost sections:

        SetEnv GIT_PROJECT_ROOT /var/local/repos/git
        SetEnv GIT_HTTP_EXPORT_ALL
        AliasMatch ^/git/(.*/objects/[0-9a-f]{2}/[0-9a-f]{38})$          /var/local/repos/git/$1
        AliasMatch ^/git/(.*/objects/pack/pack-[0-9a-f]{40}.(pack|idx))$ /var/local/repos/git/$1
        <LocationMatch "^/git/">
            AddHandler mod_python .py
            AuthType Basic
            AuthName "Git Access"
            PythonAccessHandler /var/local/allura/scripts/ApacheAccessHandler.py
            PythonOption ALLURA_AUTH_URL https://forge-allura.apache.org/auth/do_login
            PythonOption ALLURA_PERM_URL https://forge-allura.apache.org/auth/repo_permissions
            PythonOption ALLURA_VIRTUALENV /var/local/env-allura
        </LocationMatch>
        ProxyPass /git/ !
        ScriptAlias /git/ /usr/lib/git-core/git-http-backend/
    

    I also had to: apt-get install libapache2-mod-python

     
    Last edit: Cory Johns 2014-03-27


Anonymous


Cancel   Add attachments