Cannot update packages after adding Sublime Text repo

I finished installing Manjaro and tried to install sublime-text using the instructions on the official website
When I try to sudo pacman -Syu sublime-text, I get an error :

error: sublime-text: key "F57D4F59BD3DF454" is unknown
:: Import PGP key F57D4F59BD3DF454? [Y/n]

If do Y I get

error: key "F57D4F59BD3DF454" could not be looked up remotely
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
 multilib is up to date
 sublime-text         1824,0   B  0,00   B/s 00:00 [######################] 100%
 sublime-text.sig      543,0   B  0,00   B/s 00:00 [######################] 100%
error: sublime-text: key "F57D4F59BD3DF454" is unknown
:: Import PGP key F57D4F59BD3DF454? [Y/n]

I get this error, no matter what answer I give :

error: key "F57D4F59BD3DF454" could not be looked up remotely
error: failed to update sublime-text (invalid or corrupted database (PGP signature))
error: failed to synchronize all databases

I can’t do anything with pacman.

Welcome at the forum, @Anosema,

Please provide full information when asking for help. What are all the commands you have entered? pacman allone won’t be able to install it as it’s not in the Manjaro repo’s.

I guess you have followed this instructions?

Better install sublime-text-3 from AUR.

1 Like

Thanks,
yes I followed the instruction you linked (couldn’t put it in the topic)
I can’t use AUR to install it, because I’m using root user (so I can’t use makepkg)

I think you should make yourself familar with users and groups.

Also have a look here:
https://wiki.manjaro.org/index.php?title=Linux_Security

Create a regular user and give it sudo permissions, in future better log in as the new user.

you forgot to add/install the sublime gpg key to the pacman keyring

https://www.sublimetext.com/docs/3/linux_repositories.html#pacman

pacman

Install the GPG key:

curl -O https://download.sublimetext.com/sublimehq-pub.gpg && sudo pacman-key --add sublimehq-pub.gpg && sudo pacman-key --lsign-key 8A8F901A && rm sublimehq-pub.gpg

Select the channel to use:
Stable

echo -e "\n[sublime-text]\nServer = https://download.sublimetext.com/arch/stable/x86_64" | sudo tee -a /etc/pacman.conf

Dev

echo -e "\n[sublime-text]\nServer = https://download.sublimetext.com/arch/dev/x86_64" | sudo tee -a /etc/pacman.conf

Update pacman and install Sublime Text

sudo pacman -Syu sublime-text