DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 518JqcvW3430849
Authentication-Results: delorie.com; dmarc=pass (p=none dis=none) header.from=cygwin.com
Authentication-Results: delorie.com; spf=pass smtp.mailfrom=cygwin.com
DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 518JqcvW3430849
Authentication-Results: delorie.com;
	dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=Xu92zos8
X-Recipient: archive-cygwin@delorie.com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 866C5385840C
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
	s=default; t=1739044356;
	bh=5NhzDMLBAC3qVEUNT64Wh8OeOIJfa8aTmoc2fXHoWTs=;
	h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe:
	 List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:
	 From;
	b=Xu92zos8Fzo01YiFgbNeyzTeaX2dSuFjdbpuTs+KasA7M7772D8vw+MbBcFbUMoza
	 fPLcK+f4eVgSbrQZVatYFXsj9Kq78jsHEjVT2DkV55nraSdvw8x+Jm552x13f4eeby
	 54KLYHixS9QoH50XU6cbO9dFstmwve/bXLONC/7k=
X-Original-To: cygwin@cygwin.com
Delivered-To: cygwin@cygwin.com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B1D7A3858D33
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org B1D7A3858D33
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1739044292; cv=none;
 b=VSDrQmEsOAIxCGgXzXrp1RWAi6SUEDrFH1Oe6PErTwxvKDQBg21qdC7uRZwXSQKYCHg9MuArlskC/n4UqQaENrlkqcrArt+F4oUo6K+7psHrf7md7ui/EuiL4KQ8VS4wM89rVOzkLV9zHDaoF8TKJliPMwKapv1unimQC8SNAss=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
 t=1739044292; c=relaxed/simple;
 bh=i/spLYfXwHQfWSwPEUnUDgqusvK4LKhhU3al8NEX8js=;
 h=Message-ID:Date:MIME-Version:From:Subject:To:DKIM-Signature;
 b=IvDhlLHtH1wMVrR1WxeAfp47CYxsBq5j5UtEQmNbcGmKJP6T9XbD/x5h22kYVjC++U8Aje1vfqBqrQHyDQVisNix+rzHe8+G40W5otVgAXLWpSTB9dKrHPRHJzY0vF2CjCmrvaOcMawn9/jCATMvI1Gw3/o64EIgM2UG39+g15Q=
ARC-Authentication-Results: i=1; server2.sourceware.org
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B1D7A3858D33
Message-ID: <2edbf6e0-750a-4cf6-875e-ef3c412d5980@SystematicSW.ab.ca>
Date: Sat, 8 Feb 2025 12:51:28 -0700
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: Cloning enterprise github repo with cygwin git tries to use
 username/password auth, have to use Windows git
Content-Language: en-CA
To: cygwin@cygwin.com
References: <DM3PR02MB102567B1CF88616359771EC269DF12@DM3PR02MB10256.namprd02.prod.outlook.com>
Autocrypt: addr=Brian.Inglis@SystematicSW.ab.ca; keydata=
 xjMEXopx8xYJKwYBBAHaRw8BAQdAnCK0qv/xwUCCZQoA9BHRYpstERrspfT0NkUWQVuoePbN
 LkJyaWFuIEluZ2xpcyA8QnJpYW4uSW5nbGlzQFN5c3RlbWF0aWNTdy5hYi5jYT7ClgQTFggA
 PhYhBMM5/lbU970GBS2bZB62lxu92I8YBQJeinHzAhsDBQkJZgGABQsJCAcCBhUKCQgLAgQW
 AgMBAh4BAheAAAoJEB62lxu92I8Y0ioBAI8xrggNxziAVmr+Xm6nnyjoujMqWcq3oEhlYGAO
 WacZAQDFtdDx2koSVSoOmfaOyRTbIWSf9/Cjai29060fsmdsDM44BF6KcfMSCisGAQQBl1UB
 BQEBB0Awv8kHI2PaEgViDqzbnoe8B9KMHoBZLS92HdC7ZPh8HQMBCAfCfgQYFggAJhYhBMM5
 /lbU970GBS2bZB62lxu92I8YBQJeinHzAhsMBQkJZgGAAAoJEB62lxu92I8YZwUBAJw/74rF
 IyaSsGI7ewCdCy88Lce/kdwX7zGwid+f8NZ3AQC/ezTFFi5obXnyMxZJN464nPXiggtT9gN5
 RSyTY8X+AQ==
Organization: Systematic Software
In-Reply-To: <DM3PR02MB102567B1CF88616359771EC269DF12@DM3PR02MB10256.namprd02.prod.outlook.com>
X-Stat-Signature: khdwz4ory6jkwh7xair6cw7hueus5ugs
X-Rspamd-Server: rspamout02
X-Rspamd-Queue-Id: C33F820024
X-Session-Marker: 427269616E2E496E676C69734053797374656D6174696353572E61622E6361
X-Session-ID: U2FsdGVkX19US1rF+6h/XpIQny3V7imNoAdXOS33gRo=
X-HE-Tag: 1739044289-729413
X-HE-Meta: U2FsdGVkX1+Fjf5wuHVxL1pJJRP8QP81SDIiQQBHbCy+kRgBGvhyh6/sWN1dggrJFG8SLQ2lc19AUF/kiBgQJN17lBBskigxSPaVqEaDLpt+G8egmBPOk2TDvvLb0UxMYCpOORrZV+OYFZ3mklYxJng4hqnxHhMwsat6Qtnuv1CPvPH7BrerZSutY4D/l1JAtEOODMaRO7O1s68uXbBkPl8KiRkYC/iJUKqdRi2ZPozsiHQDyJQIvL6k/hEPsvHptLjvAD7Rcu0LFeFsu5++q1RkV+2l4Wb4sEo/vKqMlQc2R0J2uJFr01hIOcvCqxcJM0/qQ3Jvi59vvmQ78DlKC1U5dTTiMNidds+bEby4ZGKczKo5LAH/NA==
X-BeenThere: cygwin@cygwin.com
X-Mailman-Version: 2.1.30
Precedence: list
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-request@cygwin.com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=subscribe>
From: Brian Inglis via Cygwin <cygwin@cygwin.com>
Reply-To: cygwin@cygwin.com
Cc: Brian Inglis <Brian.Inglis@SystematicSW.ab.ca>
Content-Type: text/plain; charset="utf-8"; Format="flowed"
Errors-To: cygwin-bounces~archive-cygwin=delorie.com@cygwin.com
Sender: "Cygwin" <cygwin-bounces~archive-cygwin=delorie.com@cygwin.com>
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 518JqcvW3430849

On 2025-02-07 15:09, KARR, DAVID via Cygwin wrote:
> For quite a while, we've been using bitbucket for our intranet code repositories.  I typically use ssh auth for this. I have my key registered in our servers.  I have been able to use the Cygwin git for this, and it all works fine.
> 
> I'm now trying to connect to our new enterprise Github repositories.  I have created a PAT in Github. I've verified that it works by testing it with some code using the github rest api.  Until now, I haven't attempted a clone from the new repositories or pushing to them.  When I attempt the clone using Cygwin git, it prompts me for a username and password, which I'm unable to supply.  If I instead do the clone using Windows Git, it just does it.  It's not clear to me whether it's even using the PAT under the covers. I'm not sure how that works.

Searching and looking at StackOverflow answers, looks like the preferred 
approach is:

	$ git {push|clone} https://[$USER]:$PAT@github.com/$owner/$repo

where:
$USER is your github userid and appears to be optional (maybe included in PAT)
$PAT is your Personal Access Token and should be used if prompted for Password

If you *push*, you can search .git/ files modified in the past few minutes for 
any instances of $PAT, and restrict access to go-rwx, otherwise search the whole 
hidden tree for any instances of $PAT and restrict access to those files.

-- 
Take care. Thanks, Brian Inglis              Calgary, Alberta, Canada

La perfection est atteinte                   Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter  not when there is no more to add
mais lorsqu'il n'y a plus rien à retrancher  but when there is no more to cut
                                 -- Antoine de Saint-Exupéry

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

