All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Langille <dlangille@sourcefire.com>
To: "brian m. carlson" <sandals@crustytoothpaste.net>,
	Dan Langille <dlangille@sourcefire.com>,
	git@vger.kernel.org
Subject: Re: forcing a user@ into the URL if not present
Date: Mon, 4 May 2015 15:35:00 -0400	[thread overview]
Message-ID: <CABU7BdcuJp3f6_cN8TpJX-brDUWL6-0Q5M0Yvpg2ND-k--yEbw@mail.gmail.com> (raw)
In-Reply-To: <20150430202342.GC5015@vauxhall.crustytoothpaste.net>

On Thu, Apr 30, 2015 at 4:23 PM, brian m. carlson
<sandals@crustytoothpaste.net> wrote:
> On Thu, Apr 30, 2015 at 04:14:12PM -0400, Dan Langille wrote:
>> Would this question be better suited for another list?
>
> Nope, this is the place to go.
>
>> On Wed, Apr 22, 2015 at 4:06 PM, Dan Langille <dlangille@sourcefire.com> wrote:
>> > Hello,
>> >
>> > I'm using git 2.3.2 with Kerberos for authentication and gito-lite for
>> > authorization.
>> >
>> > This works:
>> >
>> > $ git clone https://dvl@ repo.example.org/git/testing
>> > Cloning into 'testing'...
>> > warning: You appear to have cloned an empty repository.
>> > Checking connectivity... done.
>> >
>> > My goal: have it work without supplying dvl@ as shown here:
>> >
>> > $ git clone https://repo.example.org/git/testing
>> > Cloning into 'testing'...
>> > Username for 'https://repo.example.org':
>> >
>> > I don't want to be prompted for a password.  I want Kerberos to kick in.
>> >
>> > Following http://git-scm.com/docs/gitcredentials, the following seems to
>> > have nil effect.  Anyone used this feature already?
>> >
>> >   git config --global credential.https://repo.example.org.username dvl
>> >
>> > $ cat ~/.gitconfig
>> > [credential "https://repo.example.org"]
>> > username = dvl
>> > [http]
>> > sslCAInfo = /usr/local/etc/trusted-certificates.pem
>> >
>> > With the above, I still get prompted for a password
>> >
>> > Given my use of Kerberos for authorization, is this option feasible?
>
> Not at the present time.  The only time that the credential API is
> invoked is if it prompts for a password, and by that point you've fallen
> back to Basic authentication.
>
>> > Should I be taking a different approach?
>
> If you want it to work only with Kerberos, then any username in the URL
> is fine, as libcurl doesn't care.

That is what I found during testing.  So long as I put a username in
the URL, Kerberos worked
and all authentication occurred as expected.

>> One thing you could try is to make your URL https://git@repo.example.org
> and then use
>
>   git config --global credential.https://git@repo.example.org.username dvl
>
> and see if it does the right thing for both Kerberos and Basic auth.  It
> would be sort of a hack, but it might work.

It asks for a password, and for the correct user:

Password for 'https://dvl@repo.example.org':

Thanks Brian, for this, and your other help.  I appreciate it.

-- 
Dan Langille
Infrastructure & Operations
Talos Group
Sourcefire, Inc.

  reply	other threads:[~2015-05-04 19:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-22 20:06 forcing a user@ into the URL if not present Dan Langille
2015-04-30 20:14 ` Dan Langille
2015-04-30 20:23   ` brian m. carlson
2015-05-04 19:35     ` Dan Langille [this message]
2015-05-05 12:35       ` Dan Langille
2015-05-05 13:59         ` Johannes Schindelin
2015-05-05 17:45           ` Junio C Hamano
2015-05-06  4:52             ` Torsten Bögershausen
2015-05-06  5:29               ` Johannes Schindelin
2015-05-06 17:18                 ` Junio C Hamano

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=CABU7BdcuJp3f6_cN8TpJX-brDUWL6-0Q5M0Yvpg2ND-k--yEbw@mail.gmail.com \
    --to=dlangille@sourcefire.com \
    --cc=git@vger.kernel.org \
    --cc=sandals@crustytoothpaste.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.