Importing GPG manually

I’m trying to do something like this in my template
curl -fSsL https://blablabla/FILENAME.GPG | sudo gpg --dearmor | sudo tee /usr/share/keyrings/thefile.gpg > /dev/null
But this way I get curl error of Could not resolve host
So… I googled half a day for this and couldn’t do much…
I tried to download that .gpg file in another qube and transfer it to the template, but I don’t really understand how I can manually import that .gpg file…

I use debian template and I have curl and apt-transport-https installed

Templates doesn’t have a direct access to the internet, you need to make curl use the local proxy http://127.0.0.1:8082/

2 Likes

OMFG! It worked…! THANK YOU!

BTW: if to do it manually… how should I do it? maybe you know? because I tried like thousand ways and it didn’t worked.

Maybe like this:
cat FILENAME.GPG | sudo gpg --dearmor | sudo tee /usr/share/keyrings/thefile.gpg > /dev/null

1 Like

this should work

curl -x http://127.0.0.1:8082/ https://some_url
1 Like

YES! the cat FILENAME.GPG worked too!

yo guys… you have no idea how much energy I spent on this and you helped like within 2 mins :smile:

THANK YOU!

Yeah… I did it the first time you said about proxy and it worked! Thank you!

ah, I may have not understood what you meant by “manually” :sweat_smile:

1 Like

:smile:

This is also covered in the documentation:

1 Like