youreadforme / verdaccio-gitea-auth

Verdaccio Gitea authentication plugin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

verdaccio-gitea-auth

It's an authentication plugin for Verdaccio private node module registry that checks your Gitea private git server for user authentication.

Table of Contents

Install

Get it from the private verdaccio npm:

npm install --global verdaccio verdaccio-gitea-auth

Configuration

In your verdaccio config file YAML:

auth:
  gitea-auth:
    url: https://url-to-your-gitea-server
    defaultOrg: gitea

gitea-auth.url is not the api to the URl but just the server itself. Underneath we're concatenating /api/v1/user/orgs. If no orgs are in the list it defaults to ["gitea"].

The groups correspond to verdaccio groups that restrict access to scopes. https://verdaccio.org/docs/en/authentification#understanding-groups

We don't have user feedback how this is used in the wild so if you have a specific need please file an issue and we'll help you figure it out.

Want to generate an auth token?

npm login --registry=https://url-to-your-verdaccio-server:1234

Development

Copy the sample config and set the Gitea config.

cp test/verdaccio-config-example.yml test/verdaccio.yml

Run development tasks

npm run dev

Production

Create the production build

npm run prd

About

Verdaccio Gitea authentication plugin

License:MIT License


Languages

Language:JavaScript 100.0%