Fatal: could not read Username for 'https://github.com'

I tried upgrade my 2-container forum, but it fails. Any ideas why?

x86_64 arch detected.                                                                                                                                                    
2.0.20260803-0122: Pulling from discourse/base                                                                                                                           
Digest: sha256:ab1e7217470759e63313a16bc5b71b9f2dd7d3ae8303286e5985f563ad12b7b3                                                                                          
Status: Image is up to date for discourse/base:2.0.20260803-0122                                                                                                         
docker.io/discourse/base:2.0.20260803-0122                                                                                                                               
/usr/local/lib/ruby/gems/3.4.0/gems/pups-1.4.0/lib/pups.rb                                                                                                               /usr/local/bin/pups --stdin                                                                                                                                              
I, [2026-09-02T16:49:46.027794 #1]  INFO -- : Reading from stdin                                                                                                         
I, [2026-09-02T16:49:46.066073 #1]  INFO -- : > thpoff echo "thpoff is installed!"                                                                                       thpoff is installed!                                                                                                                                                     
I, [2026-09-02T16:49:46.079514 #1]  INFO -- : > /usr/local/bin/ruby -e 'if (ENV["DISCOURSE_SMTP_ADDRESS"] == "smtp.example.com" && ENV["DISCOURSE_SKIP_EMAIL_SETUP"] != "
1"); puts "Aborting! Mail is not configured!"; exit 1; end'                                                                                                              
I, [2026-09-02T16:49:46.242618 #1]  INFO -- : > /usr/local/bin/ruby -e 'if ENV["DISCOURSE_HOSTNAME"] == "discourse.example.com"; puts "Aborting! Domain is not configured!"; exit 1; end'                                                                                                                                                         I, [2026-09-02T16:49:46.351184 #1]  INFO -- : > /usr/local/bin/ruby -e 'if (ENV["DISCOURSE_CDN_URL"] || "")[0..1] == "//"; puts "Aborting! CDN must have a protocol specified. Once fixed you should rebake your posts now to correct all posts."; exit 1; end'                                                                                   I, [2026-09-02T16:49:46.497030 #1]  INFO -- : > rm -f /etc/cron.d/anacron                                                                                                I, [2026-09-02T16:49:46.504864 #1]  INFO -- : File > /etc/cron.d/anacron  chmod:   chown:                                                                                I, [2026-09-02T16:49:46.512848 #1]  INFO -- : File > /etc/runit/1.d/copy-env  chmod: +x  chown:  I, [2026-09-02T16:49:46.525056 #1]  INFO -- : File > /etc/service/unicorn/run  chmod: +x  chown: 
I, [2026-09-02T16:49:46.533676 #1]  INFO -- : File > /etc/service/nginx/run  chmod: +x  chown:  
I, [2026-09-02T16:49:46.542104 #1]  INFO -- : File > /etc/runit/3.d/01-nginx  chmod: +x  chown:   
I, [2026-09-02T16:49:46.557772 #1]  INFO -- : File > /etc/runit/3.d/02-unicorn  chmod: +x  chown:            
I, [2026-09-02T16:49:46.566700 #1]  INFO -- : > cd /var/www/discourse && sudo -H -E -u discourse git clean -f
I, [2026-09-02T16:49:46.797286 #1]  INFO -- : > cd /var/www/discourse && sudo -H -E -u discourse bash -c '
  set -o errexit                                                                    
  git fetch --tags --prune-tags --prune --force origin                                                                                                                   
  if [[ $(git symbolic-ref --short HEAD) == latest ]] ; then                                                                                                             
      git pull                                                                      
  else                                                                              
      git -c advice.detachedHead=false checkout latest                                                                                                                   
  fi                                                                                
'                                                                                   
fatal: could not read Username for 'https://github.com': No such device or address                                                                                       
fatal: expected flush after ref listing                                             


FAILED                                                                              
--------------------                                                                
Pups::ExecError: cd /var/www/discourse && sudo -H -E -u discourse bash -c '                                                                                              
  set -o errexit                                                                    
  git fetch --tags --prune-tags --prune --force origin                                                                                                                   
  if [[ $(git symbolic-ref --short HEAD) == latest ]] ; then                                                                                                             
      git pull                                                                      
  else                                                                              
      git -c advice.detachedHead=false checkout latest                                                                                                                   
  fi                                                                                
' failed with return #<Process::Status: pid 34 exit 128>                                                                                                                 
Location of failure: /usr/local/lib/ruby/gems/3.4.0/gems/pups-1.4.0/lib/pups/exec_command.rb:138:in 'Pups::ExecCommand#spawn'
exec failed with the params {"cd" => "$home", "tag" => "build", "hook" => "code", "cmd" => ["sudo -H -E -u discourse git clean -f", "sudo -H -E -u discourse bash -c '\n 
 set -o errexit\n  git fetch --tags --prune-tags --prune --force origin\n  if [[ $(git symbolic-ref --short HEAD) == $version ]] ; then\n      git pull\n  else\n      gi
t -c advice.detachedHead=false checkout $version\n  fi\n'", "sudo -H -E -u discourse git config user.discourse-version $version", "mkdir -p tmp", "chown discourse:www-da
ta tmp", "mkdir -p tmp/pids", "mkdir -p tmp/sockets", "touch tmp/.gitkeep", "mkdir -p                    /shared/log/rails", "bash -c \"touch -a           /shared/log/ra
ils/{production,production_errors,unicorn.stdout,unicorn.stderr,sidekiq}.log\"", "bash -c \"ln    -s           /shared/log/rails/{production,production_errors,unicorn.st
dout,unicorn.stderr,sidekiq}.log $home/log\"", "bash -c \"mkdir -p           /shared/{uploads,backups}\"", "bash -c \"ln    -s           /shared/{uploads,backups} $home/
public\"", "bash -c \"mkdir -p           /shared/tmp/{backups,restores}\"", "bash -c \"ln    -s           /shared/tmp/{backups,restores} $home/tmp\"", "chown -R discours
e:www-data /shared/log/rails /shared/uploads /shared/backups /shared/tmp", "[ ! -d public/plugins ] || find public/plugins/ -maxdepth 1 -xtype l -delete"]}
bootstrap failed with exit code 128                                                 
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one.
./discourse-doctor may help diagnose the problem.                                                                                                                        
f21423e74889e97cf80d8d237c4ca8bb1d4674e6e3a0a30527d1b4394d5d8c98

Yeah, I’m officially down as well now.

First I get some Oops The software powering this discussion forum encountered an unexpected problem

Never seen that before. So logged in and rebooted while searching for what is going on.

Didn’t help. Ok, I just have new users coming in and we can’t be down. So I haven’t upgraded in a few months. But guess I have to do rebuild app at least.

Which then fails on the username question.

Tried ./discourse-doctor but ended up with the same github error.

Will try to look at logs.

Note: Also at a nice 5G of diskspace left but usually have managed to upgrade just barely. Doubling the diskspace would double the cost and never have had time to move the whole thing to my own server.

Tried to look at logs but only notice a lot of connection refuses like:
/usr/local/lib/ruby/3.4.0/socket.rb:1639:in ‘Socket#__connect_nonblock’: Connection refused - connect(2) for 127.0.0.1:6379 (Errno::ECONNREFUSED)

Just spent 2h having gemini guess sso was the culprit I got an oops (in Opera). After a few million tries of everything I just tested in firefox and everything worked normally. Since my sso uses a redirect maybe today’s opera update contains some 301/302 changes.
But waiting for the username to be resolved. Not that I want to upgrade now, can’t have the site down just because things like to break. But will add another 10G of disk space in the cloud at least :smiley: . Oh, and I will definitely take a site backup right NOW! :smiley:

I suppose it’s related?

I can’t update my components on my forum, and on rebuild I get an unexpected

./launcher rebuild app
arm64 arch detected.
WARNING: This output is designed for human readability. For machine-readable output, please use --format.
Ensuring launcher is up to date
Username for 'https://github.com':

My forum uses a discourse.diy domain.

Propably it is. Sounds that way.

It started earlier today, and I would guess it came when Voice was added into core. But that is just a feeling.

We’ll have to just wait :man_shrugging:

now I really like 2-container solution…

It seems to be an issue with Github, found a discussion here: Unauthenticated clone of a public repo intermittently returns 401 (prompts for Username) from CI workers · community · Discussion #206581 · GitHub

Hey everyone! :waving_hand: Thank you for raising this. We have shared this with our internal teams to investigate - if we have any updates we will post here and in appropriate discussions :sparkles:

As possible workaround, but I would encourage you to wait first, this works:

cd /var/discourse
git config --global http.version HTTP/1.1
./launcher rebuild app

(you might need to rebuild two times because PostgreSQL upgrade)

I upgraded about 10 sites today with no errors (that weren’t disk space).

That looks like a command line upgrade, but if it wasn’t, I’d definitely recommend that.

5GB isn’t nice, it’s barely enough to build a new container. Have you done a ./launcher cleanup lately?

That would make sense. And it probably isn’t affecting everyone equally.

An alternative which might be much less disruptive might be to change the setting like this:

# docker exec -i -u discourse app git config --global http.version HTTP/1.1

(at your own risk, of course.)

As I usually do, I will open up the problem a bit more, almost a fun story about 3-5 points of failure.
Not that fun after 4h of investigations around midnight. Some of this is probably technically incorrect but it’s a more fun read with possible errors.

Base facts (sorry explanations): My sso redirects to my home server (after Gandi failed to solve some things a few years back and I moved to Dynadot). Also works better redirecting after Hostpapa bough the very reliable LFC hosting and you could not be sure about them upgrading something silently and your whole infra coming down.

Now for the 3 (or could I even count this as a 5 point failure, would be a new record)

1*) Opera updated today, again, apparently adding some code that really (dis)likes 301/302 redirections and hard caches them (Chromium something).
2*) Dynadot apparently had a 30+ second lag tonight (which is what is needed to trigger the Chromium problem, which now got cached, uh oh).
3*) Discourse crashed (the oops mentioned above) because it could not access sso within 30 seconds. App had to be relaunched but I’m actually not sure if Discourse was down until relaunch or not (I was in panic mode :wink: ). Gemini had me running in loops around sso/rails/redis etc based on the logs though. This is after I tried to upgrade but mentioning it under this point to keep this coherent.
4*) As I cannot figure out whats going wrong, I reboot the linux just in case and start to upgrade Discourse. Which fails because of the github problem. And yes, had to clean disks a bit first as usual but I was never at 0G which would have been a possible reason as well for redis problems. And yes II, now that things seem stable I will add 10G in the cloud and maybe Arkshine upgrade.
5*) Kinda the 1st problem but while trying to solve all this I continiously hard refresh the page to see if something would have been fixed somewhere. I’m guessing I’m hitting the cached redirect from the initial failure all the time though, which means I cannot even see if the problem has been fixed, even after the first relaunch.

  1. I can access my sso just fine.
  2. Another domain site not using sso also works well.
  3. Disabling sso for discourse, shows the forum, but I have never had normal logins work so not much help there. But at least I now know it really is sso messing things up.
  4. Gemini suggests testing in a private window so I actually fire up Firefox instead and, what, the forum works just fine. Great, except… whaaaat?
  5. Opera still fails. Yes, still caching the redirect I suspect but not something I knew at the time. Not going to clear site cookies, caches etc yet.
  6. Since things work I did the necessary work I actually intended to do using Firefox for half an hour.
  7. Restarted Opera and hey presto, the forum shows. Might have restarted Opera earlier, don’t remember, but maybe the cache now timed out and did a proper refresh.

Funnily I woke up this morning and Opera did yet another upgrade. Maybe this hard cache upgrade created a lot of problems elsewhere too :slight_smile: .

Additional note: 3) is of course the most interesting part for us. Maybe it can still be found from the logs (can dig if needed). If Discourse crashes, does it try to relaunch using some timer? Or was the whole site down until I logged in and relaunched the app?

I have two self-hosted Discourse instances that are down at the moment. In the logs, I see lines like this:

I, [2026-09-03T06:02:41.640393 #80]  INFO -- : reaped unknown subprocess #<Process::Status: pid 3079826 exit 128>
I, [2026-09-03T06:03:10.006495 #80]  INFO -- : reaped unknown subprocess #<Process::Status: pid 3079864 exit 128>
I, [2026-09-03T06:03:10.394732 #80]  INFO -- : reaped unknown subprocess #<Process::Status: pid 3079871 exit 128>
E, [2026-09-03T06:03:10.518338 #722] ERROR -- : worker=0 gen=0 pid=722 timed out, exiting
I, [2026-09-03T06:03:10.530245 #722]  INFO -- : worker=0 gen=0 pid=722 exiting

The 128 exit code looks suspiciously like Git.

Could this be related? And if so, why would a failed GitHub lookup cause an instance to go down?

I wonder if this is related​:thinking:

Hi,

seems to work now. First rebuild runs against an error, but second try and the update works and discourse is online again. Version check is also working now.