gitcredentials(7)


NAME

   gitcredentials - providing usernames and passwords to Git

SYNOPSIS

   git config credential.https://example.com.username myusername
   git config credential.helper "$helper $options"

DESCRIPTION

   Git will sometimes need credentials from the user in order to perform
   operations; for example, it may need to ask for a username and password
   in order to access a remote repository over HTTP. This manual describes
   the mechanisms Git uses to request these credentials, as well as some
   features to avoid inputting these credentials repeatedly.

REQUESTING CREDENTIALS

   Without any credential helpers defined, Git will try the following
   strategies to ask the user for usernames and passwords:

    1. If the GIT_ASKPASS environment variable is set, the program
       specified by the variable is invoked. A suitable prompt is provided
       to the program on the command line, and the user's input is read
       from its standard output.

    2. Otherwise, if the core.askPass configuration variable is set, its
       value is used as above.

    3. Otherwise, if the SSH_ASKPASS environment variable is set, its
       value is used as above.

    4. Otherwise, the user is prompted on the terminal.

AVOIDING REPETITION

   It can be cumbersome to input the same credentials over and over. Git
   provides two methods to reduce this annoyance:

    1. Static configuration of usernames for a given authentication
       context.

    2. Credential helpers to cache or store passwords, or to interact with
       a system password wallet or keychain.

   The first is simple and appropriate if you do not have secure storage
   available for a password. It is generally configured by adding this to
   your config:

       [credential "https://example.com"]
               username = me

   Credential helpers, on the other hand, are external programs from which
   Git can request both usernames and passwords; they typically interface
   with secure storage provided by the OS or other programs.

   To use a helper, you must first select one to use. Git currently
   includes the following helpers:

   cache
       Cache credentials in memory for a short period of time. See git-
       credential-cache(1) for details.

   store
       Store credentials indefinitely on disk. See git-credential-store(1)
       for details.

   You may also have third-party helpers installed; search for
   credential-* in the output of git help -a, and consult the
   documentation of individual helpers. Once you have selected a helper,
   you can tell Git to use it by putting its name into the
   credential.helper variable.

    1. Find a helper.

           $ git help -a | grep credential-
           credential-foo

    2. Read its description.

           $ git help credential-foo

    3. Tell Git to use it.

           $ git config --global credential.helper foo

   If there are multiple instances of the credential.helper configuration
   variable, each helper will be tried in turn, and may provide a
   username, password, or nothing. Once Git has acquired both a username
   and a password, no more helpers will be tried.

   If credential.helper is configured to the empty string, this resets the
   helper list to empty (so you may override a helper set by a
   lower-priority config file by configuring the empty-string helper,
   followed by whatever set of helpers you would like).

CREDENTIAL CONTEXTS

   Git considers each credential to have a context defined by a URL. This
   context is used to look up context-specific configuration, and is
   passed to any helpers, which may use it as an index into secure
   storage.

   For instance, imagine we are accessing https://example.com/foo.git.
   When Git looks into a config file to see if a section matches this
   context, it will consider the two a match if the context is a
   more-specific subset of the pattern in the config file. For example, if
   you have this in your config file:

       [credential "https://example.com"]
               username = foo

   then we will match: both protocols are the same, both hosts are the
   same, and the "pattern" URL does not care about the path component at
   all. However, this context would not match:

       [credential "https://kernel.org"]
               username = foo

   because the hostnames differ. Nor would it match foo.example.com; Git
   compares hostnames exactly, without considering whether two hosts are
   part of the same domain. Likewise, a config entry for
   http://example.com would not match: Git compares the protocols exactly.

CONFIGURATION OPTIONS

   Options for a credential context can be configured either in
   credential.* (which applies to all credentials), or credential.<url>.*,
   where <url> matches the context as described above.

   The following options are available in either location:

   helper
       The name of an external credential helper, and any associated
       options. If the helper name is not an absolute path, then the
       string git credential- is prepended. The resulting string is
       executed by the shell (so, for example, setting this to foo
       --option=bar will execute git credential-foo --option=bar via the
       shell. See the manual of specific helpers for examples of their
       use.

   username
       A default username, if one is not provided in the URL.

   useHttpPath
       By default, Git does not consider the "path" component of an http
       URL to be worth matching via external helpers. This means that a
       credential stored for https://example.com/foo.git will also be used
       for https://example.com/bar.git. If you do want to distinguish
       these cases, set this option to true.

CUSTOM HELPERS

   You can write your own custom helpers to interface with any system in
   which you keep credentials. See the documentation for Git's credentials
   API[1] for details.

GIT

   Part of the git(1) suite

NOTES

    1. credentials API
       file:///usr/share/doc/git/html/technical/api-credentials.html





Opportunity


Personal Opportunity - Free software gives you access to billions of dollars of software at no cost. Use this software for your business, personal use or to develop a profitable skill. Access to source code provides access to a level of capabilities/information that companies protect though copyrights. Open source is a core component of the Internet and it is available to you. Leverage the billions of dollars in resources and capabilities to build a career, establish a business or change the world. The potential is endless for those who understand the opportunity.

Business Opportunity - Goldman Sachs, IBM and countless large corporations are leveraging open source to reduce costs, develop products and increase their bottom lines. Learn what these companies know about open source and how open source can give you the advantage.





Free Software


Free Software provides computer programs and capabilities at no cost but more importantly, it provides the freedom to run, edit, contribute to, and share the software. The importance of free software is a matter of access, not price. Software at no cost is a benefit but ownership rights to the software and source code is far more significant.


Free Office Software - The Libre Office suite provides top desktop productivity tools for free. This includes, a word processor, spreadsheet, presentation engine, drawing and flowcharting, database and math applications. Libre Office is available for Linux or Windows.





Free Books


The Free Books Library is a collection of thousands of the most popular public domain books in an online readable format. The collection includes great classical literature and more recent works where the U.S. copyright has expired. These books are yours to read and use without restrictions.


Source Code - Want to change a program or know how it works? Open Source provides the source code for its programs so that anyone can use, modify or learn how to write those programs themselves. Visit the GNU source code repositories to download the source.





Education


Study at Harvard, Stanford or MIT - Open edX provides free online courses from Harvard, MIT, Columbia, UC Berkeley and other top Universities. Hundreds of courses for almost all major subjects and course levels. Open edx also offers some paid courses and selected certifications.


Linux Manual Pages - A man or manual page is a form of software documentation found on Linux/Unix operating systems. Topics covered include computer programs (including library and system calls), formal standards and conventions, and even abstract concepts.