We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi there,
I did manage to create some functions to mimic the GIT functions. but i cannot write functions that need authentication.
i do not know how to translate the (url, usernameFromUrl, types) => part of the CredentialsHandler to powershell
options.CredentialsProvider = new CredentialsHandler( (url, usernameFromUrl, types) => new UsernamePasswordCredentials() { Username = USERNAME, Password = PASSWORD });
[LibGit2Sharp.UsernamePasswordCredentials] $UserCred = New-Object LibGit2Sharp.UsernamePasswordCredentials $Credentials.UserName = $Username $Credentials.Password = $Password
PS U:\> [LibGit2Sharp.Handlers.CredentialsHandler]::new OverloadDefinitions ------------------- LibGit2Sharp.Handlers.CredentialsHandler new(System.Object object, System.IntPtr method)
so the main question is how to create a "CredentialsHandler"
The text was updated successfully, but these errors were encountered:
CredentialsHandler is just a delegate. Have you tried something like this?
CredentialsHandler
options.CredentialsProvider = { param($url, $usernameFromUrl, $types) # Inspect params if you want $UserCred = New-Object LibGit2Sharp.UsernamePasswordCredentials $UserCred.UserName = $Username $UserCred.Password = $Password return $UserCred }
Sorry, something went wrong.
No branches or pull requests
Hi there,
I did manage to create some functions to mimic the GIT functions.
but i cannot write functions that need authentication.
i do not know how to translate the (url, usernameFromUrl, types) => part of the CredentialsHandler to powershell
so the main question is how to create a "CredentialsHandler"
The text was updated successfully, but these errors were encountered: