geluk / pass-winmenu

An easy-to-use password manager for Windows, compatible with pass.
MIT License
385 stars 25 forks source link

LibGit2Sharp requirement #10

Closed rvernica closed 7 years ago

rvernica commented 7 years ago

It seems to require LibGit2Sharp library which is not mentioned in the docs. Some notes about it and any alternatives might be useful.

image

geluk commented 7 years ago

I've updated the readme file to mention the dependency. The release builds have LibGit2Sharp included in the executable, so I don't think that's the cause of your issue. Can you check if it still occurs on the latest (1.5) release?

rvernica commented 7 years ago

Actually, that is the binary from 1.5 release. I am not sure why it shows 1.4 but that is the binary from pass-winmenu-v1.5.zip. I can see the git2-ssh-baa87df.dll file but I am not sure why it is not picked up.

geluk commented 7 years ago

Noted. It looks like I've forgotten to set the assembly version to the correct value for the 1.5 build. I'll look into having that done automatically as a part of the build process.

Would you mind checking Event Viewer (under Windows Logs/Application) for any errors?

rvernica commented 7 years ago

Thanks for the suggestion to look into Event Viewer. I figured it out. I was getting the error because I had no Git repository initialized yet. I first got this:

Exception Info: LibGit2Sharp.RepositoryNotFoundException
   at LibGit2Sharp.Core.Proxy.git_repository_open(System.String)
   at LibGit2Sharp.Repository..ctor(System.String, LibGit2Sharp.RepositoryOptions, RepositoryRequiredParameter)
   at PassWinmenu.ExternalPrograms.Git..ctor(System.String)
   at PassWinmenu.Program..ctor()
   at PassWinmenu.Program.Main(System.String[])

Then, after initializing the Git repository I got this:

Exception Info: System.ArgumentNullException
   at LibGit2Sharp.RemoteCollection.RemoteForName(System.String, Boolean)
   at LibGit2Sharp.RemoteCollection.get_Item(System.String)
   at PassWinmenu.ExternalPrograms.Git.IsSshRemote()
   at PassWinmenu.Program..ctor()
   at PassWinmenu.Program.Main(System.String[])

I was following the README and the Creating a new password store section suggests starting the application. I was getting stuck there. The next section, Password synchronization, talks about creating the Git repository. Some clarifications might help here.

geluk commented 7 years ago

I've made a small change so that Git support is simply disabled if no Git repository can be found. If a repository is created, it will be detected the next time pass-winmenu starts.

This should fix the rather user-unfriendly crash on startup, and it's a more sensible approach anyway, since you don't necessarily have to use Git to synchronise your password store.