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]:$p...@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

Reply via email to