From: "Carlos Martín Nieto" <cmn@elego.de>
To: "J. Bakshi" <joydeep@infoservices.in>
Cc: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>, git@vger.kernel.org
Subject: Re: How to force git to use authentication as author
Date: Thu, 14 Jul 2011 13:00:02 +0200 [thread overview]
Message-ID: <1310641202.18730.16.camel@bee.lab.cmartin.tk> (raw)
In-Reply-To: <20110714161838.1e30893a@shiva.selfip.org>
On Thu, 2011-07-14 at 16:18 +0530, J. Bakshi wrote:
> On Thu, 14 Jul 2011 12:38:59 +0200
> Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:
>
> > On Thu, Jul 14, 2011 at 12:36, J. Bakshi <joydeep@infoservices.in>
> wrote:
> >
> > > How can I force git to use the username as define
> at /home/git/PASSWD as the author name for git commit ?
> >
> > Edit the global bashrc to have:
> >
> > export GIT_AUTHOR_NAME=$(cat ~/PASSWD)
> >
> > ?
>
> Thanks.
>
> [1] will it work with file generated by htpasswd ? as that file is
> actually created by same (/home/git/PASSWD)
Not directly, if it only has one line, then $(cat ~/PASSWD | cut -d ':'
-f 1) should work, but I haven't tested it.
>
> [2] And the commit is over http, So is it effective to set the value
> by .bashrc ?
You are misunderstanding either how git works or the nomenclature. The
commits all happen locally and need no authentication whatsoever (and
usually you're expected to use a real name and email address). When you
need to authenticate is when yuou push your changes somewhere (a central
repo, for example). This is where the ~/.netrc file comes into play, as
I mentioned in the reply to your other mail.
Cheers,
cmn
next prev parent reply other threads:[~2011-07-14 11:00 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-14 10:36 How to force git to use authentication as author J. Bakshi
2011-07-14 10:38 ` Ævar Arnfjörð Bjarmason
2011-07-14 10:48 ` J. Bakshi
2011-07-14 11:00 ` Carlos Martín Nieto [this message]
2011-07-14 11:15 ` J. Bakshi
2011-07-14 11:38 ` Carlos Martín Nieto
2011-07-14 12:00 ` Erik Faye-Lund
2011-07-14 12:19 ` J. Bakshi
2011-07-14 12:26 ` Carlos Martín Nieto
2011-07-14 12:01 ` J. Bakshi
2011-07-14 12:16 ` Ferry Huberts
2011-07-14 12:44 ` Jakub Narebski
2011-07-14 11:38 ` J. Bakshi
2011-07-14 11:53 ` Erik Faye-Lund
2011-07-14 19:45 ` Jonathan Nieder
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1310641202.18730.16.camel@bee.lab.cmartin.tk \
--to=cmn@elego.de \
--cc=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=joydeep@infoservices.in \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).