System administration

I’m looking for a command line way to create and remove user account to GitLab

Have you tried using Gitlab api’s?

Following curl command will add user with minimum information.
curl -H “PRIVATE-TOKEN: <private_token>” -H ‘Content-Type:application/json’ -H ‘Accept:application/json’ -X POST -d ‘{“email”:"",“password”:"",“username”:"",“name”:""}’ http:///api/v4/users

curl -H “PRIVATE-TOKEN: <private_token>” -X DELETE http:///api/v4/users/

https://docs.gitlab.com/ee/api/users.html

1 Like