GOCD – Basic user password login and API (authentication)

1. generate password hash
$ php -r 'echo base64_encode(sha1("badger", true));'
ThmbShxAtJepX80c2JY1FzOEmUk=

2. create password file
sudo -u go touch /etc/go/passwd
echo "<username>:<password hash>" > /etc/go/passwd

3. enable password file
Admin -> Server Configuration -> User Management -> Password File Settings -> Password File Path -> /etc/go/passwd -> Save

used links:
https://docs.go.cd/current/configuration/dev_authentication.html