{"repo":"de-vri-es/auth-git2-rs","free":true,"listed":false,"github":"https://github.com/de-vri-es/auth-git2-rs","clone":"git clone https://github.com/de-vri-es/auth-git2-rs.git","description":"Easy authentication for git2 in Rust","language":"Rust","stars":13,"topics":["authentication","git","libgit2","rust","ssh","hacktoberfest"],"license":"BSD-2-Clause","category":"auth-billing-email","readme_excerpt":"auth-git2 Easy authentication for [ git2 ]. Authentication with [ git2 ] can be quite difficult to implement correctly. This crate aims to make it easy. Features Has a small dependency tree. Can query the SSH agent for private key authentication. Can get SSH keys from files. Can prompt the user for passwords for encrypted SSH keys. Only supported for OpenSSH private keys. Can query the git credential helper for usernames and passwords. Can use pre-provided plain usernames and passwords. Can prompt the user for credentials as a last resort. Allows you to fully customize all user prompts. The default user prompts will: Use the git askpass helper if it is configured. Fall back to prompting the user on the terminal if there is no askpass program configured. Skip the prompt if there is also no terminal available for the process. Creating an authenticator and enabling authentication mechanisms You can create use [ GitAuthenticator::new() ] (or [ default() ][ GitAuthenticator::default() ]) to create a ready-to-use authenticator. Using one of these constructors will enable all supported authentication mechanisms. You can still add more private key files from non-default locations to try if desired. You can also use [ GitAuthenticator::new empty() ] to create an authenticator without any authentication mechanism enabled. Then you can selectively enable authentication mechanisms and add custom private key files. Using the authenticator For the most flexibility, you can get a [ git2::Cr","default_branch":null,"files":null,"tree":[],"storefront":"/r/de-vri-es","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/de-vri-es/auth-git2-rs/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}