Jump to content
Search Community

Bitbucket pipeline fails

Basebuilder test
Moderator Tag

Go to solution Solved by Basebuilder,

Recommended Posts

Hi all,

After numerous attempts to get our Bitbucket CI/CD working with .npmrc / .yarnrc config files, I am explicitly setting the config in our install.sh script:

yarn config set @gsap:registry https://npm.greensock.com
yarn config set //npm.greensock.com/:_authToken xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
yarn install

When it runs it shows that the config is applied, but the download is refused with a 403 error:

yarn config v1.22.19
success Set "@gsap:registry" to "https://npm.greensock.com".
Done in 0.05s.
yarn config v1.22.19
success Set "//npm.greensock.com/:_authToken" to "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx".
Done in 0.05s.
yarn install v1.22.19
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
error An unexpected error occurred: "https://npm.greensock.com/@gsap%2fbusiness/-/business-3.12.2.tgz: Request failed \"403 Forbidden\"".

Does anyone have an idea how to get it to work?
We have a valid business license, and locally it works fine.

Thanks so much,

Menno

 

 

Link to comment
Share on other sites

Hi @Basebuilder and welcome to the GreenSock forums!

 

Thanks  for being a Club GreenScock member and supporting GreenSock!

 

Normally when using yarn this config on the .npmrc file works for me:

always-auth=true
registry=https://npm.greensock.com
@gsap:registry=https://npm.greensock.com
//npm.greensock.com/:_authToken=${NPM_TOKEN}

Where I get NPM_TOKEN from an environmental variable. I'm not familiar at all with Bitbucket's CI/CD pipelines so I can't offer specific advice on that, but hopefully this helps.

 

Let us know if you have more questions.

Happy Tweening!

Link to comment
Share on other sites

  • Solution

Hi @Prasanna and @Rodrigo,

 

Thank you. That indeed works. To recap for anyone bumping into this thread later.

We are deploying successfully in our Bitbucket pipeline by adding to our pipeline script:

yarn config set @gsap:registry https://npm.greensock.com
yarn config set //npm.greensock.com/:_authToken xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

And by running

yarn add @gsap/business gsap@npm:@gsap/business

to update the package.json file.

Thank you for your support,

Menno
 

  • Like 1
  • Thanks 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...