简体   繁体   中英

git-p4 : No such file or directory

I am trying to use git-p4 on Linux and added the git-p4.py to my .gitconfig. However, on clone, I got this error:

math@math:/mnt/d$ git p4 clone //depot/path/main@all
Importing from //depot/path/main@all into main
Reinitialized existing Git repository in /mnt/d/main/.git/
Traceback (most recent call last):
  File "/home/math/bin/git-p4.py", line 3703, in <module>
    main()
  File "/home/math/bin/git-p4.py", line 3697, in main
    if not cmd.run(args):
  File "/home/math/bin/git-p4.py", line 3571, in run
    if not P4Sync.run(self, depotPaths):
  File "/home/math/bin/git-p4.py", line 3411, in run
    changes = p4ChangesForPaths(self.depotPaths, self.changeRange, self.changes_block_size)
  File "/home/math/bin/git-p4.py", line 807, in p4ChangesForPaths
    changeEnd = p4_last_change()
  File "/home/math/bin/git-p4.py", line 266, in p4_last_change
    results = p4CmdList(["changes", "-m", "1"])
  File "/home/math/bin/git-p4.py", line 492, in p4CmdList
    stdout=subprocess.PIPE)
  File "/usr/lib/python2.7/subprocess.py", line 711, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1343, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

What's directory or file is supposed to exists ? I' ve set up the following env variables: P4HOST,P4PASSWD,P4PORT,P4USER.

Ran into the same problem right now. And yes, @BryanPendleton was right: you just need to add p4 to your $PATH .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM