前言

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

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

最新文章

  1. SQL批量更新数据库中所有用户数据表中字段类型为tinyint为int
  2. windows对象分类
  3. I Hate It HDOJ---1754
  4. sql 删除多项
  5. 2014-06-13 jq chart
  6. [译]URL和URI的区别
  7. HDU 2389 Rain on your Parade / HUST 1164 4 Rain on your Parade(二分图的最大匹配)
  8. (function($){...})(jQuery)和$(document).ready(function(){}) 的区别
  9. VM虚拟机连Linux黑屏问题
  10. postgresql和oracle数据库对比
  11. spring统一错误响应设置
  12. 将一个C++的AES加密算法(有向量的)翻译成C#
  13. 在windows下编写shell脚本
  14. GNOME Shell Extension常用扩展
  15. Linux系统查看系统是32位还是64位方法总结 in 创新实训
  16. 网页图片提取助手(支持背景图、选择dom范围)
  17. ROS创建Web代理(Web proxy)给QQ使用HTTP代理
  18. nvidia 驱动下载地址
  19. Linux 基础教程 39-作业控制
  20. 课时6.HTTP协议(理解)

热门文章

  1. 微信小程序 - 上传图片(组件)
  2. 微信小程序 - 分包加载(独立分包)
  3. 深度学习-Caffe编译测试的小总结
  4. JAVA设计模式(全部)
  5. SpringMVC+Spring+mybatis项目从零开始--分布式项目结构搭建
  6. jqPlot图表插件学习之ajax-json数据加载
  7. SQL Manager Lite可视化工具部分中英对照
  8. 1388:Lake Counting
  9. Linux下wc命令统计文件行数/词数/字符数/最长行字符数
  10. ssm(spring mvc+mybatis)+netty4开发qiq