Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git p4 clone command gives error : failure accessing depot: could not connect

Tags:

git

perforce

I am not able to run the git p4 clone //depot/xyz command on my git bash. It gives me error failure accessing depot: could not connect and just creates a empty directory with .git folder. I have done all the required configurations for git p4.

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

I set the p4 configurations like below in git bash

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

However, if I enter p4 client command and edit the configuration giving the exact depot path like below, I am able to run p4 sync to load the project. So it doesn't look like a network/credentials/firewall/port etc etc issue: (below p4 client configuration lets me run p4 sync successfully)

  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/...

I can confirm that git p4 is successfully installed. What could be going wrong here? Is it something related to git-p4.py ?

like image 987
Naxi Avatar asked Oct 03 '18 09:10

Naxi


Video Answer


2 Answers

As it turns out, git p4 doesn't work properly with python 3.0.xx which I was using. Changed to python 2.7.1 and everything works smoothly without doing any manual configuration (p4 client).

Just do the below configuration for p4 and you are good to use git p4 clone //depot

p4 set P4PORT=ssl:perforce1.xyx.net:1212
p4 set P4USER=<<user.name>>
p4 set P4PASSWD=<<password>>
like image 60
Naxi Avatar answered Nov 15 '22 00:11

Naxi


git-p4 has never worked with python3. I've been having a go at making it work - you can see my current attempt here:

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

It still needs quite a bit of work, but a few of the tests are starting to pass. Most still fail though.

like image 33
Luke Avatar answered Nov 14 '22 22:11

Luke