FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Support libssh2 based callbacks by zentron · Pull Request #2182 · libgit2/libgit2sharp · GitHub

Support libssh2 based callbacks - #2182

Closed
zentron wants to merge 1 commit into
libgit2:masterfrom
OctopusDeploy:robe/custom-build
Closed

Support libssh2 based callbacks#2182
zentron wants to merge 1 commit into
libgit2:masterfrom
OctopusDeploy:robe/custom-build

Conversation

zentron commented Mar 16, 2026

Copy link
Copy Markdown
Contributor

This PR is not intended to be merged as-is


<PropertyGroup>
<TargetFrameworks Condition="'$(TargetFrameworks)'==''">net472;net8.0;net9.0</TargetFrameworks>
<TargetFrameworks Condition="'$(TargetFrameworks)'==''">net10.0</TargetFrameworks>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Bunch of changes to get it building locally

@@ -0,0 +1,141 @@

zentron Mar 16, 2026
edited
Loading

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This methods are required to be able to call down into the c libraries methods that are only available when using libssh2. The files in this class can be properly tidied up and split up before merge

private static string nativeLibraryPath;
private static bool nativeLibraryPathLocked;
private static readonly string nativeLibraryDefaultPath = null;
private static readonly string nativeLibraryDefaultPath = "/Users/robert/Development/Sandbox/libgit2/build";

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Obviously not something to merge, just that helped testing against my local build of libgit2

/// <summary>
/// Options controlling ListRemote behavior.
/// </summary>
public sealed class ListRemoteOptions

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

New ListRemoteOptions required to get appropriate handlers on the network list operation

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This can probably be put in as its own PR back into the upstream repo as its not really dependant on anything ssh

Comment thread LibGit2Sharp/Network.cs
Ensure.ArgumentNotNull(remote, "remote");

return ListReferencesInternal(remote.Url, null, new ProxyOptions());
var options = new ListRemoteOptions()

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

There are a bunch of overloads in this network class to utilize the new ListRemoteOptions, these dont necessarily need to be implemented exactly like this

types |= SupportedCredentialTypes.Default;
}

if (credTypes.HasFlag(GitCredentialType.SshKey))

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

To cater for the different credential callback for ssh commands these new enum values need to be catered for here

zentron closed this Mar 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL