Opened 4 years ago

Last modified 4 years ago

#2657 new enhancement

P4Source should include P4TICKETS environment variable or all P4 environment variables

Reported by: Robin.Emery Owned by:
Priority: minor Milestone: 0.9.+
Version: 0.8.8 Keywords: p4
Cc:

Description

The P4Source change source class includes a set of P4* environment variables, however this is not the full set of variables used by the Perforce client.

An example of how this can be a problem: To avoid storing the Perforce build account password in plain text, the Perforce server can issue a login ticket that has an extremely long expiration such that it does not practically expire. The account can be restricted at the Perforce server side to particular IPs, read-only etc. A manual login is made once and the ticket is stored.

The p4 client looks for the ticket based on the P4TICKETS variable or at $HOME/.p4tickets. Neither P4TICKETS or HOME are copied to the environment of the p4 command run by P4Source. Using this method, P4Source fails to poll the depot as there are no credentials for the p4user.

This can be worked-around by appending variables to the env_vars list of an instance of P4Source.

The full list of variables is here (although P4TICKETS is described as "esoteric"): http://www.perforce.com/perforce/doc.current/manuals/cmdref/envars.html

Change History (3)

comment:1 Changed 4 years ago by Robin.Emery

  • Summary changed from P4Source should include P4TICKETS environent variable or all P4 environment variables to P4Source should include P4TICKETS environment variable or all P4 environment variables

comment:2 Changed 4 years ago by dustin

  • Keywords p4 added; P4Source removed
  • Milestone changed from undecided to 0.8.+

comment:3 Changed 4 years ago by dustin

  • Milestone changed from 0.8.+ to 0.9.+

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.