Sign inSign up

lokkju/nexus3-github-auth

By lokkju

•Updated over 7 years ago

Sonatype Nexus 3 with Github authentication integration enabled

Image
0

10K+

lokkju/nexus3-github-auth repository overview

docker stars docker pulls docker automated docker build status

⁠Credits

This docker image is based on sonatype/docker-nexus3⁠ with the nexus3-github-oauth-plugin⁠ enabled.

⁠Run the docker image

$ docker volume create --name nexus-data
$ docker run -d -p 8081:8081 --name nexus -v nexus-data:/nexus-data lokkju/nexus3-github-auth

⁠Configure Github Authentication

⁠1. Activate the Realm

Log in to your nexus and go to Administration > Security > Realms. Move the Github Realm to the right. The realm order in the form determines the order of the realms in your authentication flow. We recommend putting Github after the built-in realms: setup

⁠2. Group / Roles Mapping

When logged in through Github, all organizations and teams the user is a member of will be mapped into roles like so:

organization name/team name e.g. dummy-org/developers

You need to manually create these roles in Administration > Security > Roles > (+) Create Role > Nexus Role in order to assign them the desired priviliges. Note that anybody is allowed to login (authenticate) with a valid Github Token from your Github instance, but he/she won't have any priviledges assigned with their teams (authorization).

role-mapping

⁠Usage

The following steps need to be done by every developer who wants to login to your nexus with Github.

⁠1. Generate OAuth Token

In your github account under Settings > Personal access tokens generate a new OAuth token. The only scope you need is read:org

⁠2. Login to nexus

When logging in to nexus, use your github user name as the username and the oauth token you just generated as the password. This also works through maven, gradle etc.

Tag summary

Content type

Image

Digest

Size

267.3 MB

Last updated

over 7 years ago

docker pull lokkju/nexus3-github-auth