Getting "Unable to login" Error Messages For p4 Repository

Still need help?

The Atlassian Community is here for you.

Ask the community

Problem

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

  1. As a service in windows, launched via launchd on OS X
  2. Running as a restricted user (the user's login shell is /usr/bin/false)

Cause

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.

Resolution

Setting the 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.P4TICKETS=c:\Path\to\.p4tickets).

Last modified on Nov 2, 2018

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.