question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No token found and can't prompt for login when running with --non-interactive for gpr-publish

See original GitHub issue

When I run yarn publish in github action for GPR, I get following error

yarn publish v1.22.4
warning package.json: No license field
warning package.json: No license field
[1/4] Bumping version...
info Current version: 2.0.0-beta.3
[2/4] Logging in...
error No token found and can't prompt for login when running with --non-interactive.
info Visit https://yarnpkg.com/en/docs/cli/publish for documentation about this command.
##[error]Process completed with exit code 1.

Meanwhile it works fine for NPM publish flow. My workflow configuration: https://github.com/AjayPoshak/instagram-story/blob/master/.github/workflows/npmpublish.yml

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:20
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

7reactions
Untankycommented, Mar 19, 2021

I got it working for me.

I had not set the publishConfig.registry in my package.json. With that set it works perfectly.

2reactions
manovotnycommented, Jan 17, 2021

I had the same issue and adding always-auth and registry-url worked for me, as suggested in this other issue / comment.

- name: Set node version
  uses: actions/setup-node@v1
  with:
      always-auth: true
      node-version: 12.14.0
      registry-url: 'https://npm.pkg.github.com'
Read more comments on GitHub >

github_iconTop Results From Across the Web

No token found and can't prompt for login when running with ...
In my repo I have the workflow like this: - run: yarn publish env: NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} I've added NPM_AUTH_TOKEN ...
Read more >
Yarn can't authenticate with Github Packages - but npm can
Using an automation token will not prompt for a one-time passcode, meaning that you can use it as a secret in your publish...
Read more >
GitHub package — way to go for your private npm packages
Step-by-step guide on how to use a free GitHub package registry to store private npm packages (often needed for the design systems).
Read more >
Read more - Aaron Powell
nSummary In this post we’ve seen how we can run the Docker CosmosDB ... nIt looks like the login screen to a Microsoft...
Read more >
tldr-book.pdf
Execute 100 HTTP POST requests to a URL, using a JSON payload from a file: ... Upgrade Azure CLI and Extensions without prompting...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found