-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Yarn add fails if package url should be fetched using "git config --global url" #2614
Comments
I have a same issue |
I've got the same thing with github and a private repository.
|
I'm also running into this while trying to install from a forked npm package hosted in a private BitBucket repo. |
Note to others hacking on this - we were only able to get this to work if putting it in your GLOBAL gitconfig. It was still failing for us when the exact same config was put in the local git config. Here is what we had to do to pull from a private github repo with an access token:
|
I can confirm that gitlab doesn't not have this issue.
Note that it fails if the dependency is declared using
This works as long as the person triggering the job has the permission to that package. |
If you are having problems with this in github actions, and also using the |
I had similar issue inside a github action. Instead of:
I added this:
Is it good? no. |
For anyone else running into this, what worked for us was simply replacing - uses: actions/checkout@v4 with - uses: actions/checkout@v4
with:
persist-credentials: false Thanks @afirth for the pointer to the checkout action! |
in a project i work in, the line in
package.json
of a dependancy is:in an automated environment the following command runs before
npm install
:now when running
yarn install --verbose
i see that yarn first tries to getgit refs
from the repository but it has no permissions, and fails with 401:maybe in case of 401, the repository should be fetched using GIT.
The text was updated successfully, but these errors were encountered: