git/list[1] front-page[2] threads[3] people[4] search[5] about
 

"git p4" fails when perforce login not needed

From
POPeter Osterlund <peterosterlund2@gmail.com>
Date
Jan 6, 2019, 22:48 UTC
Message-ID
<alpine.LFD.2.21.1901062337420.5908@fractal.localdomain>
Hi,

When I use "git p4 sync" to update a git repository from a perforce depot, the operation fails with error message:

     failure accessing depot: unknown error code info
When I run "p4 login -s" from a shell it reports:
     'login' not necessary, no password set for this user.
The following patch fixes the problem for me:

--- /usr/libexec/git-core/git-p4~ 2018-12-15 14:51:07.000000000 +0100 +++ /usr/libexec/git-core/git-p4 2019-01-06 23:23:06.934176387 +0100

@@ -332,6 +332,8 @@
              die_bad_access("p4 error: {0}".format(data))
          else:
              die_bad_access("unknown error")
+    elif code == "info":
+        return
      else:
          die_bad_access("unknown error code {0}".format(code))


Not sure if this helps, but running "p4 -G login -s | hexdump" gives:

00000000  7b 73 04 00 00 00 63 6f  64 65 73 04 00 00 00 69  |{s....codes....i|
00000010  6e 66 6f 73 05 00 00 00  6c 65 76 65 6c 69 00 00  |nfos....leveli..|
00000020  00 00 73 04 00 00 00 64  61 74 61 73 35 00 00 00  |..s....datas5...|
00000030  27 6c 6f 67 69 6e 27 20  6e 6f 74 20 6e 65 63 65  |'login' not nece|
00000040  73 73 61 72 79 2c 20 6e  6f 20 70 61 73 73 77 6f  |ssary, no passwo|
00000050  72 64 20 73 65 74 20 66  6f 72 20 74 68 69 73 20  |rd set for this |
00000060  75 73 65 72 2e 30                                 |user.0|
00000066

Best regards,
-- 
Peter Osterlund - peterosterlund2@gmail.com
http://hem.bredband.net/petero2b
Next: Luke Diamand
Message 1 of 3 in “"git p4" fails when perforce login not needed”
  1. Peter OsterlundJan 6, 2019
  2. Luke DiamandJan 7, 2019
  3. Mazo, AndreyJan 7, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.