Login to SSL-only server fails
Login to a server using only SSL fails. Logs show this this is due to the "allow connection/p4 trust prompt".
STEPS TO REPRODUCE:
- Setup a client/server environment. The critical element is a Perforce server that responds to SSL only.
- On the Linux client, create a client and pull down some files.
- On the Linux client, create a .p4config in the clientspec root with correct P4USER/P4CLIENT/P4PORT to connect to the server. P4PORT must use ssl: prefix. Reproduction used IP v4 server address with default port.
- On the Linux client, verify commands all work fine.
- In VS Code, connect to the Linux client via SSH
- In VS Code, select View|Command Palette, then Perforce: Log in to Perforce
- At the Perforce password prompt, enter your password
- Run any perforce extension command, like opened
EXPECTED: Command works, or user is prompted to trust server and then command works.
ACTUAL: Nothing happens. Output|Perforce log shows the extension was prompted to trust the server and never responded, so login failed.
NOTES:
- Worked well before our admins required SSL
- If you run p4 trust on the client, then restart Visual Studio Code, it will also work fine. This means you must delete the trust entry to reproduce the problem.
- The p4 trust is local workspace specific. If you have 4 workspaces on this host, you'll have to issue p4 trust for each one.
- The bug is that the extension should handle this situation by issuing the trust command on user confirmation. Or, at least, tell the user why it failed so they can take action.
LOGS
.p4config : Editor opened /sanitized/workspace name/.p4config /sanitized/workspace name: p4 '-u' 'username' 'info' ERROR: "The authenticity of 'serveripv4:1666' can't be established,\nthis may be your first attempt to connect to this P4PORT.\nThe fingerprint for the key sent to your client is\nsanitized fingerprint\nTo allow connection use the 'p4 trust' command.\n" ERROR: "The authenticity of 'serveripv4:1666' can't be established,\nthis may be your first attempt to connect to this P4PORT.\nThe fingerprint for the key sent to your client is\nsanitized fingerprint\nTo allow connection use the 'p4 trust' command.\n" >>> .p4config : * /sanitized/workspace name/.p4config : NO CLIENT ROOT FOUND >>> .p4config : NOT creating an SCM provider
Versions & Details: Server version: sanitized 2020.2/sanitized Extension version: 8/14/2022, 11:02:45 VS Code version: 1.71.0 for Windows Workspace: SINGLE root
thanks for reporting - seems like we should just open a notification asking if the user wants to trust the connection
If you run p4 trust on the client, then restart Visual Studio Code
Interested to know if the restart is actually required? Does it work without restarting?
I concur. My steps were written to make sure the bug would reproduce. It’s possible you don’t need to restart VS Code, but my experience with the plug in so far is sometimes yes, sometimes no.
David L-
On Sun, Sep 11, 2022 at 12:32 PM Matt Crouch @.***> wrote:
thanks for reporting - seems like we should just open a notification asking if the user wants to trust the connection
If you run p4 trust on the client, then restart Visual Studio Code
Interested to know if the restart is actually required? Does it work without restarting?
— Reply to this email directly, view it on GitHub https://github.com/mjcrouch/vscode-perforce/issues/244#issuecomment-1242999207, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFCPGNRGAHAVOELTESWWVNTV5YCR7ANCNFSM6AAAAAAQI6E7AQ . You are receiving this because you authored the thread.Message ID: @.***>
Hey,
Kindly let me know if there is any workaround or a resolution to this issue. I am unable to login even with multiple restarts:

Thanks, Ravi