https://github.com/devlooped/credentialmanager
Packages the official Git Credential Manager cross-platform credential store implementation supporting Windows, macOS and Linux for use as a NS2.0 library with no UI or external dependencies.
https://github.com/devlooped/credentialmanager
credential-manager credential-storage credentials dotnet
Last synced: 11 months ago
JSON representation
Packages the official Git Credential Manager cross-platform credential store implementation supporting Windows, macOS and Linux for use as a NS2.0 library with no UI or external dependencies.
- Host: GitHub
- URL: https://github.com/devlooped/credentialmanager
- Owner: devlooped
- License: mit
- Created: 2021-05-17T18:27:49.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2025-07-14T00:21:50.000Z (12 months ago)
- Last Synced: 2025-07-14T02:52:08.857Z (12 months ago)
- Topics: credential-manager, credential-storage, credentials, dotnet
- Language: C#
- Homepage: https://clarius.org/CredentialManager
- Size: 425 KB
- Stars: 13
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: readme.md
- Changelog: changelog.md
- License: license.txt
Awesome Lists containing this project
README
 Git Credential Manager Lib
============
[](https://www.nuget.org/packages/Devlooped.CredentialManager)
[](https://www.nuget.org/packages/Devlooped.CredentialManager)
[](https://github.com/devlooped/CredentialManager/blob/main/license.txt)
[](https://github.com/devlooped/CredentialManager/actions)
*This project uses [SponsorLink](https://github.com/devlooped#sponsorlink)
and may issue IDE-only warnings if no active sponsorship is detected.*
Packages the official [Git Credential Manager](https://github.com/git-ecosystem/git-credential-manager/) cross-platform credential store
implementation supporting Windows, macOS and Linux for use as a NS2.0 library with no UI or external dependencies.
Release version numbers track the [GCM releases](https://github.com/GitCredentialManager/git-credential-manager/releases) themselves.
## Usage
```csharp
using GitCredentialManager;
...
ICredentialStore store = CredentialManager.Create("myapp");
// Store a credential
store.AddOrUpdate("https://foo.com", "myusr", "mypwd");
// Retrieve a credential
ICredential cred = store.Get("https://foo.com", "myusr");
Assert.Equal("myusr", cred.Account);
Assert.Equal("mypwd", cred.Password);
```
The namespace for the `CredentialManager` static factory class is the same as the official GCM itself
for convenience: `GitCredentialManager`.
The optional *namespace* argument (`myapp` above) can be used to scope credential
operations to your own app/service.
The library targets .NET Standard 2.0 for broad applicability.
Supported [credential stores](https://github.com/git-ecosystem/git-credential-manager/blob/main/docs/credstores.md) and their
configuration is shared with the GCM project itself.
## Releasing
To create a new release:
1. Find & replace the latest release tag in this project to the desired release tag in
the [git-credential-manager](https://github.com/git-ecosystem/git-credential-manager/releases) project
in the .netconfig file
2. Run `dotnet file sync -c:$env:TEMP\dotnet-file.md`
3. Use the contents of the generated file to update the release notes in the GitHub release.
If no useful notes were generated, just copy the GCM ones.
4. Create a PR like [this one](https://github.com/devlooped/CredentialManager/pull/111)
5. Once merged, create a matching release in this project.
# Sponsors
[](https://github.com/clarius)
[](https://github.com/MFB-Technologies-Inc)
[](https://github.com/torutek-gh)
[](https://github.com/drivenet)
[](https://github.com/Keflon)
[](https://github.com/tbolon)
[](https://github.com/kfrancis)
[](https://github.com/twenzel)
[](https://github.com/unoplatform)
[](https://github.com/dansiegel)
[](https://github.com/rbnswartz)
[](https://github.com/jfoshee)
[](https://github.com/Mrxx99)
[](https://github.com/eajhnsn1)
[](https://github.com/IxTechnologies)
[](https://github.com/davidjenni)
[](https://github.com/Jonathan-Hickey)
[](https://github.com/akunzai)
[](https://github.com/jakobt)
[](https://github.com/tinohager)
[](https://github.com/KenBonny)
[](https://github.com/SimonCropp)
[](https://github.com/agileworks-eu)
[](https://github.com/sorahex)
[](https://github.com/arsdragonfly)
[](https://github.com/vezel-dev)
[](https://github.com/ChilliCream)
[](https://github.com/4OTC)
[](https://github.com/v-limo)
[](https://github.com/jordansjones)
[](https://github.com/DominicSchell)
[](https://github.com/jkingry)
[](https://github.com/sponsors/devlooped)
[Learn more about GitHub Sponsors](https://github.com/sponsors)