I spent entire one day to work on password file authentication mechanism being provided by GoCD and it was all in vain .
The moment I enable "password file authentication" and specify the filename from GoCD admin .I get locked and unable to login to webUI using the userid (user1) and the password (user1) in the .passwd file. Can anyone guide with step by step process. It seems the documentation is not being maintained or updated by Go Team root@gocd:/etc# apt-get install go-server Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: go-server 0 upgraded, 1 newly installed, 0 to remove and 193 not upgraded. Need to get 0 B/174 MB of archives. After this operation, 174 MB of additional disk space will be used. Selecting previously unselected package go-server. (Reading database ... 88545 files and directories currently installed.) Unpacking go-server (from .../go-server_17.5.0-5095_all.deb) ... Processing triggers for ureadahead ... Setting up go-server (17.5.0-5095) ... Adding system startup for /etc/init.d/go-server ... /etc/rc0.d/K99go-server -> ../init.d/go-server /etc/rc1.d/K99go-server -> ../init.d/go-server /etc/rc6.d/K99go-server -> ../init.d/go-server /etc/rc2.d/S99go-server -> ../init.d/go-server /etc/rc3.d/S99go-server -> ../init.d/go-server /etc/rc4.d/S99go-server -> ../init.d/go-server /etc/rc5.d/S99go-server -> ../init.d/go-server Installation of GoCD server completed. Please edit /etc/default/go-server to add or override environment variables. Once that is done, start the GoCD server with '/etc/init.d/go-server start' root@gocd:/etc# htpasswd -c -s .passwd user Usage: htpasswd [-c] passwordfile username =======================> Note the -s options does not work here The -c flag creates a new file. root@gocd:/etc# cd go/ root@gocd:/etc/go# ll total 12 drwxrwx--- 2 go go 4096 Jun 8 09:30 ./ drwxr-xr-x 84 root root 4096 Jun 8 09:30 ../ -rw-rw---- 1 root go 3183 Jun 2 04:11 log4j.properties root@gocd:/etc/go# touch .passwd ===================> manually created the .passwd file root@gocd:/etc/go# ll total 12 drwxrwx--- 2 go go 4096 Jun 8 09:35 ./ drwxr-xr-x 84 root root 4096 Jun 8 09:30 ../ -rw-rw---- 1 root go 3183 Jun 2 04:11 log4j.properties -rw-r--r-- 1 root root 0 Jun 8 09:35 .passwd root@gocd:/etc/go# chown go:go .passwd root@gocd:/etc/go# ll total 12 drwxrwx--- 2 go go 4096 Jun 8 09:35 ./ drwxr-xr-x 84 root root 4096 Jun 8 09:30 ../ -rw-rw---- 1 root go 3183 Jun 2 04:11 log4j.properties -rw-r--r-- 1 go go 0 Jun 8 09:35 .passwd root@gocd:/etc/go# htpasswd -s .passwd user1 =======================>Again tried htpasswd -s options as mentioned on the gocd user guide and it does not work Usage: htpasswd [-c] passwordfile username The -c flag creates a new file. root@gocd:/etc/go# htpasswd .passwd user1 Adding user user1 New password: Re-type new password: root@gocd:/etc/go# /etc/init.d/go-server restart No directory, logging in with HOME=/ [Thu Jun 8 09:36:21 UTC 2017] using default settings from /etc/default/go-server Started Go Server on http://gocd:8153/go root@gocd:/etc/go# ll total 100 drwxrwx--- 2 go go 4096 Jun 8 09:37 ./ drwxr-xr-x 84 root root 4096 Jun 8 09:30 ../ -rw-rw-r-- 1 go go 3096 Jun 8 09:36 agentkeystore -rw-rw-r-- 1 go go 16 Jun 8 09:36 cipher -rw-rw-r-- 1 go go 363 Jun 8 09:37 cruise-config.xml -rw-rw-r-- 1 go go 49143 Jun 8 09:36 cruise-config.xsd -rw-rw-r-- 1 go go 964 Jun 8 09:37 go-config-before-migration-91.xml -rw-rw-r-- 1 go go 964 Jun 8 09:37 go-config-before-migration-92.xml -rw-rw-r-- 1 go go 799 Jun 8 09:36 go_update_server.pub -rw-rw-r-- 1 go go 3745 Jun 8 09:36 jetty.xml -rw-rw-r-- 1 go go 2113 Jun 8 09:36 keystore -rw-rw---- 1 root go 3183 Jun 2 04:11 log4j.properties -rw-r--r-- 1 root go 20 Jun 8 09:35 .passwd -rw-rw-r-- 1 go go 3066 Jun 8 09:36 truststore Now I get locked and unable to login to webUI using the userid (user1) and the password (user1) in the .passwd file. -- You received this message because you are subscribed to the Google Groups "go-cd" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
