Unable to clone with private token
Created by: randyaa
Setting up a dependency in a package.json file that points to a gitlab project doesn't seem to work when using a private token. This seems to work just fine using an ssh path (see http://stackoverflow.com/questions/22988876/install-npm-module-from-gitlab-private-repository) but this requires everyone to authenticate with an ssh key when they're pulling dependencies down which I don't want to require.
I found a few examples on the web that seemed to suggest this would be possible by using git+https://gitlab-ci-token:<private-token>@gitlab-url/repo.git
(see http://stackoverflow.com/questions/25409700/using-gitlab-token-to-clone-without-authentication ) but when I use this method I get a Not Authorized
message.
I've tried switching to just <user>:<pw>@gitlab-url
which wouldn't be so bad, but that doesn't seem to work either. I've also tried just <user>@gitlab-url
. All variations except the ssh path seem to fail with a Not Authorized
type of message.
We're currently on gitlab 7.10.4 & NPM 3.8.1