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.

Use with CI_JOB_TOKEN

See original GitHub issue

Is it possible to login to verdaccio with the gitlab-ci-token user and the $CI_JOB_TOKENenv var during CI builds?

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:8
  • Comments:17 (3 by maintainers)

github_iconTop GitHub Comments

6reactions
spangenbergcommented, Sep 18, 2018

@Flauschbaellchen I’m using verdaccio-gitlab-ci for this in addition to verdaccio-gitlab.

I only had to configure verdaccio-gitlab-ci before verdaccio-gitlab in the auth section.

For npm-cli-login I’m doing then this:

npm install --global --registry https://registry.npmjs.org npm-cli-login
npm-cli-login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" -r "https://$NPM_REGISTRY" -e "nobody@example.com" --config-path "$PWD/.npmrc"
5reactions
icedreamcommented, Jul 19, 2019

Hello,

just a little update as I finally got to testing package publishing. The current patches I sent in here are in fact not sufficient to allow for the CI login to be able to publish packages. Reason is that verdaccio-gitlab only checks for GitLab groups a user is assigned to and compares them against the parts of which the package name to publish is made of (so for @group/package it would check if the authenticated user - our CI “user” - is in either the GitLab group group or package). There is no checks for usernames or groups as allowed by the Verdaccio configuration, so no already implemented way to add ci to allowed usernames for publishing.

I respectively added this functionality to my patch set and I will start drafting a pull request with this in the coming days.

Read more comments on GitHub >

github_iconTop Results From Across the Web

GitLab CI/CD job token
When a pipeline job is about to run, GitLab generates a unique token and injects it as the CI_JOB_TOKEN predefined variable. You can...
Read more >
GitLab CI/CD job token
You can use the CI_JOB_TOKEN to trigger multi-project pipelines from a CI/CD job. A pipeline triggered this way creates a dependent pipeline relation...
Read more >
Access Gitlab API using $CI_JOB_TOKEN - Reddit
I am in need of using gitlab API to fetch a .tag.gz file with the files refering to a certain commit, is there...
Read more >
gitlab - 'Including' private project file using `$CI_JOB_TOKEN`
Create a new user with Reporter role. · Create a personal access token ( /profile/personal_access_tokens ) for that user with api and ...
Read more >
Readme · Triggers · Ci · Help · GitLab
You can use the CI_JOB_TOKEN variable (used to authenticate with the GitLab Container Registry) in the following cases. When used with multi-project pipelines....
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