GitHub Integration Ignored

Using the admin console to configure a GitHub integration (URL, username, password) does not modify the appsettings.json file. The respective git settings within that file remain set to blanks. In the admin console, the git configuration is accepted and sync fails with the generic auth error we always see with a GitHub integration. This seems expected since PU doesn’t seem to have saved the configuration I just entered. But if I open the git config from within the admin console, it shows me the correct URL but with blank fields for username and password. What is happening here?

Product: PowerShell Universal
Version: 3.7.14

It’s saving the settings in the database, not in the appsettings.json file. It will use the username and password (or PAT) you inserted to authenticate with git. It does not return the username\password back to the form when editing the settings.

Thanks for that reply. That is good to know. Why are there placeholders in appsettings.json for these settings. That leads to confusion, especially when the documentation is silent or not clear on the topic.

Now that I can trust PU is using my configuration, I am stuck with it failing with a generic error (“too many redirects or authentication replays”). I can find no further details to go on. The creds are correct. Log file not helpful.

Appsettings.json was the original way of configuring this but when we introduced SQL support, we added the database configuration. It was also done to avoid having to restart the PSU server over and over again while attempting to connect to git. I updated the documentation to make this clearer https://docs.powershelluniversal.com/config/git#configuration

In terms of the error, you are seeing: Are you using a PAT? If not, are you specifying credentials and have two-factor auth enabled on your account?

Note that GitHub requires tokens in some circumstances: Token authentication requirements for Git operations | The GitHub Blog

Thanks for responding.

I’m not yet using a PAT. I’ll give that a shot instead of the username/password (no MFA configured).

Result of using a PAT with full repo rights is a different error: invalid authentication scheme.

I used the portal to configure, using a blank username and the PAT in PW field. I can’t confirm my configuration, either through the portal or through a log file. The v3 docs remain confusing as they ask us to edit the appsettings.json file to insert the PAT but are not clear on whether this config section is used at all.