William Schaffer
William Schaffer

Reputation: 35

Zero-Touch Dev Environment setup with Gitlab - Given a username and password, can Gitlab support a user programmatically creating a PAT (or similar)?

I'm building some scripts with the goal of 0-touch or near-zero-touch deployment of a new user's development environment. This development environment consists of a bare-metal machine running Ubuntu, and two VirtualBox VM's also running Ubuntu. Gitlab is locally hosted on the network.

My vision is to have a single command that a user can run to initiate the setup process. For example, they could use curl to pull down and run an init script. I'm trying to avoid them needing to use Gitlab's UI to create a PAT.

However, after a lot of searching of Gitlab's API, it looks like this can only be done using either a PAT or by logging into the actual web UI for Gitlab.

So, I'm looking for a way for a user to be able to either use their username and password to automatically upload an SSH key, or create some other kind of access token.

Basically, once that user either has a working PAT, or some other way to get run that first init script, I can take it from there.

Upvotes: 0

Views: 33

Answers (0)

Related Questions