Al instalar Heroku CLI, encontré un comando. Aquí está el comando:
curl -L https://cli-assets.heroku.com/apt/release.key | sudo apt-key add -
¿Qué significa y cómo funciona?
fuente
Al instalar Heroku CLI, encontré un comando. Aquí está el comando:
curl -L https://cli-assets.heroku.com/apt/release.key | sudo apt-key add -
¿Qué significa y cómo funciona?
curles una utilidad para descargar algo de un enlace. Por defecto, escribe en STDOUT (es decir, imprime cosas desde el enlace en el terminal)
La -Lopción de curlsignifica:
-L, --location
(HTTP/HTTPS) If the server reports that the requested page has moved to a
different location (indicated with a Location: header and a 3XX response
code), this option will make curl redo the request on the new place...
El operador |es una tubería, que pasa la salida del comando anterior como el STDIN del comando posterior.
apt-keyes una utilidad para agregar claves confiables a apt para repositorios. Puedes ver qué addhace con man apt-key:
add <filename>
Add a new key to the list of trusted keys. The key is read from the
filename given with the parameter filename or if the filename is -
from standard input.
Como se menciona, -dice apt key addque el archivo de clave debe leerse desde STDIN, que en este caso es lo que se canalizó desde el curlcomando, por lo tanto, en suma:
Descargue lo que esté en este enlace, incluso si se ha movido, y agréguelo como una clave de repositorio APT confiable.