博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
[Perforce]password (P4PASSWD) invalid or unset. 的错误解决
阅读量:6983 次
发布时间:2019-06-27

本文共 1753 字,大约阅读时间需要 5 分钟。

前言

使用 Perforce , 能够使用Perforce 的Client 端。

有时候在编写一些脚本或代码的时候, 可能或使用到 Perforce的命令的方式。

正常状况下。 使用例如以下命令:

p4 -C utf8 -p host:port -u username -p password -c workspace sync //depot_path/...
就能够sync perforce 的源文件了。

登录的帐号和密码直接接在命令的后面。

可是以上的方法并不一定正确, 可能会出现 

Perforce password (P4PASSWD) invalid or unset

的错误。

在同一台机器上使用 p4 client 登录之后就正常了。

出现这个的原因基本上是 服务端对于验证设置的原因。

服务端须要 ticket 这种验证方式。

所谓的ticket , p4 client 在登录的时候会在机器的

C:\Documents and Settings\user\下 新建一个 p4tickets.txt 的文件, 里面的内容是一系列的相似防伪码的东西。

搜索到的说明

仔细的说明一下原因:

网络上的解释:

Your server's security level doesn't allow command line passwords.
You can get around this by using a ticket value instead. Use the
login command to get a valid ticket value:
p4 login -p
That will display the ticket value instead of saving it. You should
be able to cut and paste that into your command.
=====
If you are a superuser, you should be able to log in without specifying a
password.
If you have an active ticket for your superuser account, use: p4 login
<build_user>
Otherwise use: p4 -u <superuser_user> -P <superuser_password> login <build_user>
官方:
Problem:        
When issuing a p4 command in a trigger on a Windows server, the command returns the error:
Perforce password (P4PASSWD) invalid or unset.
This error indicates that the command did not find a valid ticket for the current user and it needs to log in to create one.

解决方法

1. 方法一

先登录。再运行sync等其它命令

echo %p4passwd%|p4 login

2. 方法二

使用已经有的ticket

    Set the location of P4TICKETS with set or p4 set [-s]:

    p4 set P4TICKETS=C:\Perforce\tickets.txt
    Log in as the trigger user:
    p4 login triggeruser
    In the trigger, make sure P4TICKETS is set to the same location. You can skip this step if you used p4 set -s to set P4TICKETS:
    set P4TICKETS=C:\Perforce\tickets.txt

方法一, 我有实际的使用过, 方法二还未试用

转载地址:http://fgvpl.baihongyu.com/

你可能感兴趣的文章
云计算从“仰望星空”到“脚踏实地”
查看>>
台积电要造第一款7nm芯片 明年下半年可投产
查看>>
《逻辑与计算机设计基础(原书第5版)》——3.9 二进制加法器
查看>>
《中国人工智能学会通讯》——8.25 基于演化优化的生物网络配准
查看>>
飞鹤乳业CIO:移动化让企业品牌和消费者紧密连接
查看>>
教你编写Node.js中间件,实现服务端缓存
查看>>
美国税局再遭攻击:原是偷来的社会安全号码作祟
查看>>
2020年全球云服务规模将达3900亿美元
查看>>
Facebook、Netflix 等多家科技巨头谈“设计”
查看>>
雅虎核心业务售与Verizon:互联网先驱的时代终结
查看>>
市场规模占全国4成,广东物联网市场发展强劲
查看>>
ICS—CERT官网公示匡恩网络新发现四工控漏洞
查看>>
英国电价与光伏容量占比关系分析
查看>>
浅谈对5G核心网演进方向的几点展望
查看>>
明智地选择数据中心的五个注意事项
查看>>
开启物联网的真正潜力需要在更大程度上克服数据挑战
查看>>
张小龙公布微信小程序进展 可直接从桌面进入
查看>>
手机芯片三国杀:高通、联发科、展讯都想成霸主
查看>>
六大技巧提升员工信息安全意识
查看>>
保利协鑫多晶硅产量再创历史记录
查看>>