What put me on the right track was thinkOfaNumber's answer to this question.
What I was having trouble with was that I should have used was
"$HOME\.android\debug.keystore"
NOT %HOMEPATH%\.android\debug.keystore
NOT $env:HOMEPATH\.android\debug.keystore
on PowerShell on Windows. The one with %HOMEPATH%
for some reason still outputted a SHA1 without warning me that the file was not found.
$ErrorActionPreference = 'Stop'
[string]$JdkRoot = Resolve-Path "C:\Program Files\Android\Android Studio\jbr"
[string]$JdkBin = Resolve-Path "$JdkRoot\bin"
[string]$DebugKeystoreFilePath = Resolve-Path "$HOME\.android\debug.keystore"
$ErrorActionPreference = 'Continue'
& "$JdkBin/keytool" -exportcert -alias androiddebugkey -keystore $DebugKeystoreFilePath -storepass android | openssl sha1 -binary | openssl base64 | Set-Clipboard; Write-Host "Copied to clipboard."
See also How to see Gradle signing report