twilson63 / npm-gitlab

npm registry proxy to gitlab repositories
MIT License
11 stars 3 forks source link

GitLab Tarball URL needs to be updated #2

Open twilson63 opened 9 years ago

twilson63 commented 9 years ago

In the /routes/index.js file on L115 we need to modify the request to leverage the gitlab tarball url:

    // TODO: Change this to gitlab url
    // http://gitlab.eirenerx.com/<user>/<repo>/repository/archive.tar.gz?ref=<tag>

    var tarball_url = gitlab_uri + '/repos/' + user + '/' + repo + '/tarball/' + tag;

    debug('proxy tarball', tarball_url);

    var options = {
        url: tarball_url,
        headers: {
            'User-Agent': 'npm-github-proxy',
        }
    };

This should enable the npm cli to grab the tarball from gitlab and deploy as if pulling it from npm.

cyrilchapon commented 9 years ago

+1