I'm using P4Python to connect to a P4 server to retrieve results about some changes.
The ideal command on CLI is:
p4 -p tcp:SERVER:1666 -u USER -P PASSWORD | p4 -p tcp:HOST:1666 -u USER changes /path/...@$PROD_SHA_BUILD,@$SHA_BUILD
So I tried to replicate this via the python API:
p4 = P4()
p4.user = str(self.PERFORCE_USER)
p4.password = str(self.PERFORCE_PASSWORD)
p4.port = HOST
p4.connect()
per_user = "-u '" + str(self.PERFORCE_USER) + "'"
per_passwd = "-P '" + str(self.PERFORCE_PASSWORD) + "'"
cmd = "changes"
tmp = p4.run(cmd,["//depot/se/development/HEAD/sports-navigation/...@823493,@828026",per_user,per_passwd])
Why am I getting the error that P4PASSWD is not defined?
I even added a:
os.environ["P4PASSWD"] = str(self.PERFORCE_PASSWORD)
Thanks.
Did you already try the technique mentioned in here for ticket based authentication?