【问题标题】:git p4 clone command gives error : failure accessing depot: could not connectgit p4 clone 命令给出错误:访问仓库失败:无法连接
【发布时间】:2018-10-03 09:01:52
【问题描述】:

我无法在我的 git bash 上运行 git p4 clone //depot/xyz 命令。它给了我错误 failure access depot: could not connect 并且只是用 .git 文件夹创建了一个空目录。 我已经完成了 git p4 所需的所有配置。

git-p4.py file is present at git/bin & git-core directories.

我在 git bash 中设置了如下 p4 配置

p4 set P4PORT=ssl:perforce1.xyx.net:1212
p4 set P4USER=<<user.name>>
p4 set P4PASSWD=<<password>>

但是,如果我输入 p4 client 命令并编辑配置以提供如下所示的确切 depot 路径,我可以运行 p4 sync 来加载项目。所以它看起来不像是网络/凭据/防火墙/端口等问题:(下面的 p4 客户端配置让我可以成功运行 p4 同步)

  Client:   WKSWXXXXX

Update: 2018/10/03 04:21:40

Access: 2018/10/03 04:21:53

Owner:  neeraj.chand

Host:   WKSWXXXXX

Description:
    Created by neeraj.chand.

Root:   c:\Users\312846\git_test

Options:    noallwrite noclobber nocompress unlocked nomodtime normdir

SubmitOptions:  submitunchanged

LineEnd:    local

View:
    //depot/xyz/... //WKSWXXXX/...

我可以确认 git p4 已成功安装。 这里可能出了什么问题?是不是和 git-p4.py 有关?

【问题讨论】:

    标签: git perforce


    【解决方案1】:

    事实证明,git p4 不能与我使用的 python 3.0.xx 一起正常工作。 更改为python 2.7.1,一切顺利,无需进行任何手动配置(p4客户端)。

    只需对 p4 进行以下配置即可使用 git p4 clone //depot

    p4 set P4PORT=ssl:perforce1.xyx.net:1212
    p4 set P4USER=<<user.name>>
    p4 set P4PASSWD=<<password>>
    

    【讨论】:

      【解决方案2】:

      git-p4 从未与 python3 一起工作过。我一直在努力让它发挥作用——你可以在这里看到我目前的尝试:

      https://github.com/luked99/git/tree/git-p4-python3-final-showdown

      它仍然需要做很多工作,但一些测试已经开始通过。但大多数仍然失败。

      【讨论】:

        【解决方案3】:

        别忘了

        p4 login
        

        首先。即使设置了适当的变量,您仍然需要它。

        这里没有提到:https://git-scm.com/docs/git-p4

        【讨论】:

          猜你喜欢
          • 2016-06-29
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2020-02-06
          相关资源
          最近更新 更多