yarnpkg/yarn
View on GitHubYarn add fails if package url should be fetched using "git config --global url"
Open
#2,614 opened on Feb 2, 2017
cat-featuregood first issuehelp wantedtriaged
Description
in a project i work in, the line in package.json of a dependancy is:
"some_package": "bitbucket:some_company/some_package#develop"
in an automated environment the following command runs before npm install:
git config --global url."https://x-token-auth:${access_token}@bitbucket.org/some_company/".insteadOf https://bitbucket.org/some_company/
now when running yarn install --verbose i see that yarn first tries to get git refs from the repository but it has no permissions, and fails with 401:
verbose Request "https://bitbucket.org/some_company/some_package.git" finished with status code 302.
verbose Performing "GET" request to "https://bitbucket.org/some_company/some_package.git/info/refs?service=git-upload-pack".
verbose Request "https://bitbucket.org/some_company/some_package.git/info/refs?service=git-upload-pack" finished with status code 401.
verbose Error: Error connecting to repository. Please, check the url.
maybe in case of 401, the repository should be fetched using GIT.