I pointed curl to my HTTP proxy. now the command works.
Also, this command also works.
echo "deb [signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg arch=amd64] https://brave-browser-apt-release.s3.brave.com/ stable main"|sudo tee /etc/apt/sources.list.d/brave-browser-release.list
after that if I key in
ls /usr/share/keyrings/ I will see the brave-browser-archive-keyring.gpg inside the folder.
But now if I run sudo apt update , it always failed to get brave from the repo…
Hit:1 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:2 http://packages.microsoft.com/repos/code stable InRelease
Hit:3 http://archive.canonical.com/ubuntu focal InRelease
Hit:4 http://archive.ubuntu.com/ubuntu focal InRelease
Get:5 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Get:6 http://archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB]
Get:7 http://archive.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Hit:8 https://packages.microsoft.com/repos/edge stable InRelease
Err:9 https://brave-browser-apt-release.s3.brave.com stable InRelease
Could not connect to brave-browser-apt-release.s3.brave.com:443 (162.125.2.5), connection timed out Could not connect to brave-browser-apt-release.s3.brave.com:443 (2001::43e4:6620), connection timed out
Fetched 328 kB in 31s (10.7 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
21 packages can be upgraded. Run 'apt list --upgradable' to see them.
W: Failed to fetch https://brave-browser-apt-release.s3.brave.com/dists/stable/InRelease Could not connect to brave-browser-apt-release.s3.brave.com:443 (162.125.2.5), connection timed out Could not connect to brave-browser-apt-release.s3.brave.com:443 (2001::43e4:6620), connection timed out
W: Some index files failed to download. They have been ignored, or old ones used instead.