-
Notifications
You must be signed in to change notification settings - Fork 896
using SSH instead of username\password #1881
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
Comments
You may find the link interesting: clone a git repository with SSH and libgit2sharp and this thread #1422 |
@aloisdg Thx, but it 5 years old and no commit this time, so it is not working solution |
@shersh I plan to do it quite barebone with a powershell call to git |
Hello, I trying to use LibGit2Sharp with SSL. I merged libgit2sharp master branch with SSL branch. Thats ok! But, how to get git2 dll and libssh/zlib updated DLLs for Windows ? |
You can build git2.dll. Just go thru the "Quick Start" section. You need VS and python(if you require tests) installed.
BuildThe above will create the necessary things under the build folder. OR cmake --build . The above step will create the .dll file under the bin folder. |
Hello, is there still no
|
This is such a bummer. I was really excited about this library before I found out about this lack of SSH support. I understand the explanation provided in #1422 but I don't get why it can't be a use-at-your-own-risk kind of option. |
The v0.31.0 release notes (Dec. 3, 2024) indicate that SSH authentication is now supported through LibGit2's OpenSSH support. But I cannot find any explanation or example of how to use SSH with the latest LibGit2Sharp. Anyone have any pointers? |
ping me if you find an example. |
There's nothing special you have to do to for LibGit2Sharp to work with SSH other than have SSH configured correctly in git itself.
That works on my system just fine, and it also works if I change the repo to a private repo. |
Haha!!! Earlier before your (@bording ) comment, I tried the same and worked (the same way). I was too "full of me", eager to set the ssh params (the keys) through the CloneOptions. You are right, I must "have SSH configured correctly in git itself." |
Since SSH is now supported through libgit2's support for OpenSSH, I'm going to go ahead and close this issue as completed. |
I finally got LibGit2Sharp's SSH authentication working in the context of an MVC web app running under IIS. I wrote it up here: https://stackoverflow.com/questions/79487958/how-can-i-configure-libgit2sharp-ssh-authentication-within-an-iis-c-sharp-mvc-ap/79487959#79487959. Hope this helps! |
Because of username and password deprication
https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/
We should use SSH keys for auth.
How I can to do it with lib?
The text was updated successfully, but these errors were encountered: