Getting "Unable to login" Error Messages For p4 Repository
Having set up a p4 repository within fisheye, you get the following error message in your logs:
com.cenqua.fisheye.perforce.client.P4ClientException: Unable to get repository latest revision: Unable to login: Command failed to execute - non-zero exit code: 1 - Password invalid. at com.cenqua.fisheye.perforce.client.P4Client.getLatestRevision(P4Client.java:80) at com.cenqua.fisheye.perforce.P4Scanner.getLatestRevision(P4Scanner.java:618) at com.cenqua.fisheye.rep.RepositoryScanner.processRevisions(RepositoryScanner.java:415) at com.cenqua.fisheye.rep.RepositoryScanner.slurpRepository(RepositoryScanner.java:345)
Turning on debug (via Administration > Server Settings > Debug Logging, and turn debug logging "ON"), you reproduce the problem and see the commands that fisheye is sending to p4.
2008-04-29 01:01:40,015 DEBUG [pool-2-thread-1] fisheye.app P4CliUtils-dumpCommandLine - [HOST:1666/] Executing /usr/bin/p4 -p perforce.powerschool.com:1666 -u USERNAME -ztag changes -m 1 -s submitted //... 2008-04-29 01:01:40,253 DEBUG [pool-2-thread-1] fisheye.app P4Exec-processCommand - [HOST:1666/] Command failed with status = Command failed to execute - non-zero exit code: 1 - Perforce password (P4PASSWD) invalid or unset. 2008-04-29 01:01:40,253 DEBUG [pool-2-thread-1] fisheye.app P4CliUtils-dumpCommandLine - [HOST:1666/] Executing /usr/bin/p4 -p HOST:1666 -u USERNAME login 2008-04-29 01:01:40,493 ERROR [pool-2-thread-1] fisheye.app RepositoryScanner-slurp - Problem processing revisions from repo HOST:1666/ due to class com.cenqua.fisheye.perforce.client.P4ClientException - Unable to get repository latest revision: Command failed to execute - non-zero exit code: 1 - Perforce password (P4PASSWD) invalid or unset.
You run the command on the commandline, e.g.
/usr/bin/p4 -p HOST:1666 -u USERNAME login, and enter the password that you set when setting up your p4 repository (Administration > View Repository List > View (next to your REPO) > Edit Details, the password that you set their to access your p4 repository) and verified that it is the correct password.
Typically this problems occurs when running Fisheye
- As a service in windows, launched via launchd on OS X
- Running as a restricted user (the user's login shell is
The perforce command line tool is unable to read or set authentication tickets. The direct cause of this is that the fisheye process did not inherit a HOME environment variable, so the default location, $HOME/.p4tickets could not be found.
P4PASSWD Environment Variables works around this problem. However, this restricts the installation to a single perforce user/server combination - or at least every user/server combination to be added would need to be using the same password.
The solution which does resolve the issue is to explicitly set the location of
P4TICKETS Environment Variables in the launchd configuration plist file for OS X or set it in your wrapper.conf file as an environment variable if running as a windows service (e.g. set.