How to see gitlab users by command?

Viewed 1211

I installed gitlab on ubuntu, how can I see gitlab users by command?

Following command find root user , but I do not know user name?

user = User.find_by(username: "root")
2 Answers

What do you want to find user. If you forget root password you can find it by ID

user = User.find(1)

Gitlab support Find the user either by username, user ID or email ID:

user = User.find_by_username 'exampleuser'
#or
user = User.find(123)
#or
user = User.find_by(email: 'user@example.com')

documentary in docs.gitlab.com/reset_user_password

#git config —global —list

To list the user associated with github/gitlab

Related