Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NBug] SSH key file could not be found #10530

Closed
oleopold opened this issue Dec 15, 2022 · 18 comments · Fixed by #10545
Closed

[NBug] SSH key file could not be found #10530

oleopold opened this issue Dec 15, 2022 · 18 comments · Fixed by #10545
Labels
area: ssh/putty potential-duplicate type: regression regression, normally to latest official release
Milestone

Comments

@oleopold
Copy link

Environment

  • Git Extensions 4.0.1.15887
  • Build f2567de
  • Git 2.38.1.windows.1
  • Microsoft Windows NT 10.0.19045.0
  • .NET 6.0.12
  • DPI 96dpi (no scaling)

Issue description

''

GitUI.NBugReports.UserExternalOperationException: SSH key file could not be found
 ---> System.IO.FileNotFoundException: SSH key file could not be found
   --- End of inner exception stack trace ---
   at GitUI.Infrastructure.PuttyHelpers.ThrowIfFileNotFound(String filePath, String errorMessage, String heading)
   at GitUI.Infrastructure.PuttyHelpers.StartPageantIfConfigured(Func`1 sshKeyFileLoader)
   at GitUI.CommandsDialogs.FormPush.StartPageant(String remote)
   at GitUI.CommandsDialogs.FormPush.PushChanges(IWin32Window owner)
   at GitUI.CommandsDialogs.FormPush.PushClick(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, WM msg, IntPtr wparam, IntPtr lparam)

I just tried to push to remote origin.
Pull work just fine.
I use key stored in putty session which I use for accessing remote repository.
So I do not have private key in remote repository configuration.

Steps to reproduce

Try to push into remote configured without explicit ssh key(using putty).

Did this work in previous version of GitExtensions?

Yes

Diagnostics

No response

@duplicates-detector-bot
Copy link

Potential duplicates:

  • #8089
  • #8187
  • #8966
  • #9920
  • #10363
  • #10367
  • #10368
  • #10381
  • #10412
  • #10413
  • #10528

@vbjay
Copy link
Contributor

vbjay commented Dec 15, 2022

So fix your remote config to the correct key file path.

@SymbioticKilla
Copy link

Same problem

@RussKie
Copy link
Member

RussKie commented Dec 15, 2022

Please remove the invalid key reference from your config.

@RussKie RussKie closed this as completed Dec 15, 2022
@SymbioticKilla
Copy link

SymbioticKilla commented Dec 16, 2022

@RussKie there is no key. I have two remotes: One is DMZ with public key and one company inside without any key. If I switch to OpenSSH company remote works but I need both to work. It was working in 3.5.4 and the author of this issue said that it worked in 4.0 too.

@oleopold
Copy link
Author

I use paegant to manage keys and saved session in putty which tells the key which will be used. So if I have one server from which I clone repositories I do not have to fill key for each of them. It works for command line git and in all previous versions of GitExtensions. It stopped working in latest version.

@SymbioticKilla
Copy link

SymbioticKilla commented Dec 16, 2022

@RussKie @vbjay It is a bug. Just installed V4 and it works. In 4.0.1 doesn't work. In 3.5.4 was also working.

@RussKie RussKie reopened this Dec 17, 2022
@RussKie RussKie added this to the 4.0.2 milestone Dec 17, 2022
RussKie added a commit to RussKie/gitextensions that referenced this issue Dec 17, 2022
@ghost ghost added the 🚧 status: in progress Issues which have associated PRs label Dec 17, 2022
@RussKie RussKie linked a pull request Dec 17, 2022 that will close this issue
@RussKie RussKie added the type: regression regression, normally to latest official release label Dec 17, 2022
RussKie added a commit to RussKie/gitextensions that referenced this issue Dec 17, 2022
@RussKie RussKie removed this from the 4.0.2 milestone Dec 19, 2022
@RussKie
Copy link
Member

RussKie commented Dec 19, 2022

Does this version fix he issue?
https://ci.appveyor.com/project/gitextensions/gitextensions/builds/45710122/artifacts

@RussKie RussKie added the 📭 needs: author feedback More info/confirmation awaited from OP; issues typically get closed after 30 days of inactivity label Dec 19, 2022
@RussKie RussKie added this to the 4.0.2 milestone Dec 19, 2022
@SymbioticKilla
Copy link

Works! Thanks!

@oleopold
Copy link
Author

Yes, the build works as expected. Thank you.

@ghost ghost removed the 📭 needs: author feedback More info/confirmation awaited from OP; issues typically get closed after 30 days of inactivity label Dec 20, 2022
@gerhardol
Copy link
Member

#10545 (comment)

If a key is configured but not available, should the used be informed with a popup or this be ignored?

RussKie added a commit to RussKie/gitextensions that referenced this issue Jan 2, 2023
RussKie added a commit to RussKie/gitextensions that referenced this issue Jan 2, 2023
@ghost ghost removed the 🚧 status: in progress Issues which have associated PRs label Jan 2, 2023
@RussKie RussKie closed this as completed in d790f17 Jan 2, 2023
@oleopold
Copy link
Author

oleopold commented Jan 2, 2023

#10545 (comment)

If a key is configured but not available, should the used be informed with a popup or this be ignored?

I think that if key is configured than user should be informed when key is missing.

@RussKie
Copy link
Member

RussKie commented Jan 2, 2023

@psivanov
Copy link

psivanov commented Jan 4, 2023

Exact same issue on

  • Git Extensions 4.0.2.15986
  • Build b063d32
  • Git 2.38.1.windows.1
  • Microsoft Windows NT 10.0.17763.0
  • .NET 6.0.12
  • DPI 96dpi (no scaling)
  • Microsoft.WindowsDesktop.App Versions

@CorneliusDaniell
Copy link

Switch ssh client to OpenSSH instead of PuTTY

@psivanov
Copy link

psivanov commented Jan 4, 2023

I use pageant like oleopold and it used to work with PuTTY, though...

@mstv
Copy link
Member

mstv commented Jan 5, 2023

Exact same issue on

* Git Extensions 4.0.2.15986

Yes, you are right because

https://ci.appveyor.com/project/gitextensions/gitextensions/builds/45814904/artifacts

is the build 15986 right before the integration of the fix.

You could use https://ci.appveyor.com/project/gitextensions/gitextensions/builds/45842693/artifacts.

@psivanov
Copy link

psivanov commented Jan 6, 2023

Exact same issue on

* Git Extensions 4.0.2.15986

Yes, you are right because

https://ci.appveyor.com/project/gitextensions/gitextensions/builds/45814904/artifacts

is the build 15986 right before the integration of the fix.

You could use https://ci.appveyor.com/project/gitextensions/gitextensions/builds/45842693/artifacts.

Ah, thank you. It works now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: ssh/putty potential-duplicate type: regression regression, normally to latest official release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants