git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: How can I append authentication with "git push" ?

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 12, 2012, 17:22 UTC
Message-ID
<7vpq80c2t1.fsf@alter.siamese.dyndns.org>
In-Reply-To
<CACnwZYfbbZJV--aaOVH+af+Hxibg7XWvb909kZYWgKXVHexfDw@mail.gmail.com>
Thiago Farina <tfransosi@gmail.com> writes:
Show 9 quoted lines
> On Thu, Jul 12, 2012 at 5:18 AM, J. Bakshi
> <joydeep.bakshi@infoservices.in> wrote:
>> Or any repo wise configuration file where I can save the info, so that
>> it doesn't ask the credential before every push ?
>>
> I'd like to know how to do that too.
>
> It's a pain to have to type username and password every time I need to
> push to github. (Linux here btw).

I never type either when pushing to github, and I've been pushing there at least twice a day for quite some time (Linux here btw).

I have these in .git/config:
        [remote "github2"]
                url = https://github.com/git/git
                fetch = +refs/heads/*:refs/remotes/github2/*
                pushurl = github.com:git/git.git
                push = refs/heads/maint:refs/heads/maint
                push = refs/heads/master:refs/heads/master
                push = refs/heads/next:refs/heads/next
                push = +refs/heads/pu:refs/heads/pu
        [remote "github"]
                url = https://github.com/gitster/git
                pushurl = github.com:gitster/git.git
                mirror
and then this in $HOME/.ssh/config:
        Host github.com
                User git
                IdentityFile ~/.ssh/github
Previous: Nick DoumaNext: J. Bakshi
Message 5 of 7 in “How can I append authentication with "git push" ?”
  1. J. BakshiJul 12, 2012
  2. Jeff KingJul 12, 2012
  3. Thiago FarinaJul 12, 2012
  4. Nick DoumaJul 12, 2012
  5. Junio C HamanoJul 12, 2012
  6. J. BakshiJul 16, 2012
  7. Jeff KingJul 16, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.