Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
google-artifactregistry-auth
Advanced tools
google-artifactregistry-auth is an npm module that allows you to configure npm to interact with npm repositories stored in Artifact Registry.
This repository contains tools to simplify the process of working with npm repositories using Artifact Registry.
The Artifact Registry google-artifactregistry-auth module is an npm package which allows you to configure npm to interact with npm repositories stored in Artifact Registry.
For more details, see https://cloud.google.com/artifact-registry/docs/nodejs/authentication
The module authenticates to Artifact Registry using Google Application Default Credentials.
NOTE: This module would update credentials for all Artifact Registry repositories. It would not be suitable if you use multiple account credentials in npmrc file.
To use the module:
Log in
Using end user credentials:
$ gcloud auth application-default login
Using service account:
$ export GOOGLE_APPLICATION_CREDENTIALS=[path/to/key.json]
Add settings to connect to the repository to .npmrc. Use the output from the following command:
$ gcloud beta artifacts print-settings npm
registry=https://LOCATION-npm.pkg.dev/PROJECT_ID/REPOSITORY_ID/
//LOCATION-npm.pkg.dev/PROJECT_ID/REPOSITORY_ID/:_authToken=""
//LOCATION-npm.pkg.dev/PROJECT_ID/REPOSITORY_ID/:always-auth=true
Where
PROJECT_ID is the ID of the project.
REPOSITORY_ID is the ID of the repository.
LOCATION is the location of the repository.
Use one of these below options to run the script
Run the module outside of the directory containing the target npmrc file
$ npx google-artifactregistry-auth [path/to/.npmrc]
Include the command in the scripts in package.json
"scripts": {
"artifactregistry-login": "npx google-artifactregistry-auth [path/to/.npmrc]",
}
Run the script
$ npm run artifactregistry-login
npx
should come with npm
5.2+. If npx
is not available:
Install the module from npmjs.com as a dev dependency and include the command in the script
$ npm install google-artifactregistry-auth --save-dev
"scripts": {
"artifactregistry-login": "./node_modules/.bin/artifactregistry-auth [path/to/.npmrc]",
}
Where [path/to/.npmrc] is the optional argument you can provide to the script. If no path is provided, .npmrc file at current directory is used.
Run the script
$ npm run artifactregistry-login
FAQs
google-artifactregistry-auth is an npm module that allows you to configure npm to interact with npm repositories stored in Artifact Registry.
The npm package google-artifactregistry-auth receives a total of 333,132 weekly downloads. As such, google-artifactregistry-auth popularity was classified as popular.
We found that google-artifactregistry-auth demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.