EVOLUTION-MANAGER
Edit File: gitcreds_list.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: List all credentials stored by a git credential helper</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for gitcreds_list {gitcreds}"><tr><td>gitcreds_list {gitcreds}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>List all credentials stored by a git credential helper</h2> <h3>Description</h3> <p>This function is meant to be used interactively, to help you when configuring credential helpers. It is especially useful if you have multiple accounts on a host. </p> <h3>Usage</h3> <pre> gitcreds_list( url = "https://github.com", credential_helper = NULL, protocol = NULL ) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>url</code></td> <td> <p>URL to list credentials for. If <code>NULL</code> then the credentials are listed for all URLs. Note that for a host the results might be different if you specify or omit this argument. <code>gitcreds_list()</code> uses heuristics when the <code>url</code> is not specified. If is always best to specify the URL.</p> </td></tr> <tr valign="top"><td><code>credential_helper</code></td> <td> <p>Credential helper to use. If this is <code>NULL</code>, then the configured credential helper is used. If multiple credential helpers are configured, then the first one is used, with a warning.</p> </td></tr> <tr valign="top"><td><code>protocol</code></td> <td> <p>Protocol to list credentials for. If <code>NULL</code> and <code>url</code> includes a protocol then that is used. Otherwise <code>"https"</code> is used.</p> </td></tr> </table> <h3>Details</h3> <p>Note that this function does not use the credential helper itself, so it does not have to be installed. But it may also give false results, so interpret the results with caution, and also use the tool provided by your OS, to look at the credentials: 'Keychain Access' on macOS and 'Credential Manager' on Windows. </p> <p>Only a small number of credential helpers are supported currently. Here is a brief description of each. </p> <h4><code>osxkeychain</code> on macOS</h4> <p>This is the default credential helper on macOS. </p> <p>It has some peculiarities: </p> <ul> <li><p> If you don't specify a username in the URL, then it will return the <em>oldest</em> credentials that match the specified host name, with an arbitrary user name. </p> </li> <li><p> If the user name is specified in the URL, then it is used to look up the credentials. </p> </li></ul> <p>To change or delete the listed credentials, see the oskeyring package or the 'Keychain Access' macOS app. </p> <h4><code>manager</code>, on Windows</h4> <p>This is Git Credential Manager for Windows, see https://github.com/microsoft/Git-Credential-Manager-for-Windows </p> <p>It is currently the default helper on Windows, included in the git installer. </p> <p>It has some oddities, especially with multiple GitHub users: </p> <ul> <li><p> The <code>github</code> authority (which is used by default for <code>github.com</code> URLs) cannot handle multiple users. It always sets the <code>target_name</code> of the Windows credential to <code style="white-space: pre;">git:<URL></code> where <code style="white-space: pre;"><URL></code> does not contain the user name. Since <code>target_name</code> is a primary key, it is not possible to add multiple GitHub users with the default configuration. </p> </li> <li><p> To support multiple users, switch to the <code>Basic</code> authority, e.g. by setting the <code>GCM_AUTHORITY</code> env var to <code>Basic</code>. Then the user name will be included in <code>target_name</code>, and everything works fine. </p> </li> <li><p> For this helper <code>gitcreds_list()</code> lists all records with a matching host name. </p> </li></ul> <h4><code>manager-core</code> on Windows</h4> <p>This is Git Credential Manager Core, see https://github.com/microsoft/Git-Credential-Manager-Core </p> <p>On Windows it behaves almost the same way as <code>manager</code>, with some differences: </p> <ul> <li><p> Instead of <em>authorities</em>, it has providers. <code>github.com</code> URLs use the <code>github</code> provider by default. For better support for multiple GitHub accounts, switch to the <code>generic</code> provider by setting the <code>GCM_PROVIDER</code> env var to <code>generic</code>. </p> </li> <li> <p><code>gitcreds_list()</code> will list all credentials with a matching host, irrespectively of the user name in the input URL. </p> </li></ul> <h4><code>manager-core</code>, <em>before</em> version 2.0.246-beta, on macOS</h4> <p>This is Git Credential Manager Core, see https://github.com/microsoft/Git-Credential-Manager-Core </p> <p>This helper has some peculiarities w.r.t. user names: </p> <ul> <li><p> If the "github" provider is used (which is the default for <code>github.com</code> URLs), then it completely ignores user names, even if they are explicitly specified in the query. </p> </li> <li><p> For other providers, the user name (if specified) is saved in the Keychain item. </p> </li> <li><p> For this helper, <code>gitcreds_list()</code> always lists all records that match the <em>host</em>, even if the user name does not match, because it is impossible to tell if the user name would be used in a proper git credential lookup. </p> </li></ul> <p>To change or delete the listed credentials, see the oskeyring package or the 'Keychain Access' macOS app. </p> <h4><code>manager-core</code>, version 2.0.246-beta or newer, on macOS</h4> <p>This is a newer version of Git Credential Manager Core, that supports multiple users better: </p> <ul> <li><p> if a user name is provided, then it saves it in the credential store, and it uses this user name for looking up credentials, even for the <code>github</code> provider. </p> </li> <li> <p><code>gitcreds_list()</code> always lists all records that match the host, even if the user name does not match. </p> </li> <li><p> Credentials that were created by an older version of <code>manager-core</code>, with the <code>generic</code> provider, do not work with the newer version of <code>manager-core</code>, because the format of the Keychain item is different. </p> </li></ul> <h3>Value</h3> <p>A list of <code>oskeyring_macos_item</code> objects. See <code><a href="../../oskeyring/html/macos_keychain.html">oskeyring::macos_item()</a></code>. </p> <hr /><div style="text-align: center;">[Package <em>gitcreds</em> version 0.1.2 <a href="00Index.html">Index</a>]</div> </body></html>