前言

使用 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

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

[Perforce]password (P4PASSWD) invalid or unset. 的错误解决相关推荐

  1. mybatis报“Invalid value for getInt()“错误

    mybatis报"Invalid value for getInt()"错误 解决方法二:看一下属性的顺序和数据库中的顺序是否一致 解决方法1:在实体类中写上个无参构造

  2. ndk-build 报 Fatal error: invalid -march= option: `armv5te' 错误的解决办法

    ndk版本 r8e 操作系统:ubuntu 12 编译jni 报 Fatal error: invalid -march= option: `armv5te' 错误 解决办法: ln -s $NDK_ ...

  3. python导入模块报错syntaxerror_SyntaxError: invalid syntax python错误解决方法

    今天爱分享给大家带来SyntaxError: invalid syntax python错误解决方法,希望能够帮助到大家. "SyntaxError: invalid syntax" ...

  4. java.io.StreamCorruptedException: invalid type code: AC错误的解决方法

    问题描述: 在向一个文件写入可序列化对象时,每次只想向文件的末尾添加一个可序列化的对象,于是使用了FileOutputStream(文件名,true)间接的构建了ObjectOutputStream流 ...

  5. ORA-00911: invalid character 错误解决

    同事遇到了一个奇怪的问题:同样的SQL语句,写在C#里,访问oracle数据库,在他机器执行会报错,而其他机器则不会. 这条语句拿到他本机的PL/SQL developer执行,又没有问题. [外链图 ...

  6. SyntaxError :invalid syntax错误解决办法

    今天学习了python,然而刚开始就出了一个SyntaxError :invalid syntax错误,明明代码没有一点问题,可是每次运行都会显示 "SyntaxError: invalid ...

  7. 微信退款 v2版本 invalid detail参数格式错误

    ##invalid detail参数格式错误 <return_code><![CDATA[FAIL]]></return_code> <return_msg& ...

  8. UnicodeDecodeError: ‘utf-8‘ codec can‘t decode byte 0x80 in position 0: invalid start byte 错误解决

    UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 0: invalid start byte 错误解决 解决: ...

  9. Ansys|关于使用HFSS仿真报错“the password is invalid for INTEL MPl to launch jobs. ”(附有安装方法)

    先前我遇到这个问题的具体情况(1条消息) Ansys|the password is invalid for INTEL MPl to launch jobs.仿真计算失败-吐槽问答-CSDN问答 我 ...

最新文章

  1. vim编辑器异常退出产生备份文件
  2. 建堆 java_堆排序就这么简单
  3. 前端交易型系统设计原则
  4. com:向对象到面向服务
  5. DirectX 开发环境配置
  6. java json格式的转换和读取
  7. 再次携号转网_湖北省通信管理局召开视频会议 再次强调携号转网服务要求
  8. qgraphicsitem鼠标移动事件阻塞_常用的DOM事件
  9. 中标麒麟/NeoKylin 安装QT开发环境
  10. 前端如何玩转虚拟机_想运行虚拟机,用win10自带的Hyper-V即可,不用安装其它软件...
  11. Saltstack-7:返回
  12. 百度搜索框智能提示功能代码
  13. 极客大学架构师训练营-架构师技术图谱-大作业二
  14. JAVA网络编程——URL
  15. KARL MAYER卡尔迈耶驱动器维修SP0405-KM SP0404 SP0403
  16. smail语法 详解
  17. 最大流问题与Ford-Fulkerson算法介绍
  18. 24小时“凶宅试睡直播”去“凶”,阿里拍卖为卖凶宅有点拼
  19. c++二进制转化成十进制
  20. macos同时运行多个版本php程序(nginx+php56+php72)

热门文章

  1. Java 多态 ——一个案例 彻底搞懂它
  2. Angular 小试牛刀[2]:CI(travie+firebase)
  3. Elasticsearch学习之基本核心概念
  4. 《现代操作系统》笔记 2 线程
  5. flash player 10 音频新API使用:调节音高(pitch)
  6. Kerberos与Sniffer,矛与盾永远的对立
  7. 在项目中配置PageHelper插件时遇到类型转换异常
  8. 跨域问题深入理解以及解决办法
  9. 关于IIS8.5在配置完后出现503问题解决方案
  10. 解决Linux里面未启用网卡的问题