User Management
Static Password or Password Reset?
If a password is omitted from an entry in /etc/packagecloud/users.yml
, it will attempt mail that user a password reset link instead (make sure Mailer/SMTP is properly configured).
Encrypting passwords
Passwords supplied in /etc/packagecloud/users.yml
must be encrypted before being used. You can encrypt passwords using packagecloud-ctl encrypt-password
.
Example:
packagecloud-ctl encrypt-password password123
Adding users
To add a user, add a row to /etc/packagecloud/users.yml
with their email and name.
Attributes:
email: 'me@local.anctur.space',
name: 'julio',
password: '$2a$10$yi7irjvgHS8FA0pYUP3Yfuz6XoQlP9wZiGWA2RBM0uzxgFq4r8/Z6'
Example:
- {email: 'me@local.anctur.space', name: 'julio', password: '$2a$10$yi7irjvgHS8FA0pYUP3Yfuz6XoQlP9wZiGWA2RBM0uzxgFq4r8/Z6'}
Run to apply the changes:
packagecloud-ctl load-users
Reseting/Changing passwords
You can reset a users password with the following command:
Example:
packagecloud-ctl reset-password user@example.com newpassword123
Skipping users
To skip a user, add a row to /etc/packagecloud/users.yml
with an email, name, and action set to delete
.
Attributes:
email: 'skip@local.anctur.space',
name: 'skipper',
password: '$4a$2F$yi8irjvgHS8FA0pYUP3Yfuz6XoQlP9wZiGWA2RBM0uzxgFq2r4/F8',
action: 'delete'
Example:
- {email: 'skip@local.anctur.space', name: 'skipper', password: '$4a$2F$yi8irjvgHS8FA0pYUP3Yfuz6XoQlP9wZiGWA2RBM0uzxgFq2r4/F8', action: 'delete'}
Run to apply the changes:
packagecloud-ctl load-users
Adding users as collaborators on repositories
To add a new or existing user as a collaborator, add a collaborations
attribute on the user entry in /etc/packagecloud/users.yml
. NOTE: The repository receiving the collaborator must already exist and it must be specified as :user/:repo
in the collaborations
array.
Attributes:
email: 'me@local.anctur.space',
name: 'armando', password: '$2a$10$...',
collaborations: [":user/:repo"]
Example:
- {email: 'me@local.anctur.space', name: 'armando', password: '$2a$10$...', collaborations: ["packagecloud/enterprise"]}
Run to apply the changes:
packagecloud-ctl load-users
Removing users
To remove a user, find their row in /etc/packagecloud/users.yml
and add action: 'delete'
.
Attributes:
email: 'me@local.anctur.space',
name: 'julio',
password: '$2a$10$...',
action: 'delete'
Example:
- {email: 'me@local.anctur.space', name: 'julio', password: '$2a$10$...', action: 'delete'}
Run to apply the changes:
packagecloud-ctl load-user
Example Users.yml
# # Users Seed File # # Populate the `users:`` key with users, specifying name, email # and optionally, a password. If no password is specified an activation email is sent, otherwise # the password specified is used. # # NOTE: The password must be encrypted using `sudo packagecloud-ctl encrypt-password <password>` first! # # Example: # # users: # - {email: 'foo@asd.com', name: 'person', password: '$alc2a29aas'} users: - {email: 'user@test.com', name: 'user', password: '$2a$10$a9NX...'} - {email: 'user2@test.com', name: 'user2', password: '$2a$10$...', collaborations: ['user/test']} - {email: 'user3@gmail.com', name: 'user3', password: '$2a$109...', collaborations: ['user/test']}
Related Pages