GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Documentation
  • API Reference
  • Getting started
  • FAQ
  • Socket Firewall
  • Prerequisites
  • Stand Up Socket Firewall For The First Time
  • Flat block
  • Cooldown
  • Policy config
  • Redis cache
  • Metadata filtering
  • Deployments
  • DNS override

This view

  • Original page
  • New address

GeezerVison is showing docs.socket.dev — socket login

If you have a Socket.dev API token you can use socket login to store the token in a file such that it will automatically use that token when you run commands.

socket login asks for your API token. Leave it blank to use Socket's limited public token. It then:

  • verifies the token and sets the first organization it has access to as your default org
  • asks whether Socket should enforce your enterprise organization's security policies system-wide, if the token has access to one
  • offers to install bash tab completion, which adds a loader line to ~/.bashrc
  • saves the token, along with --api-base-url and --api-proxy if you passed them

The settings are saved in a config.json file in Socket's settings folder:

  • macOS: ~/Library/Application Support/socket/settings
  • Linux: ~/.local/share/socket/settings
  • Windows: %LOCALAPPDATA%\socket\settings

On macOS and Linux, $XDG_DATA_HOME/socket/settings is used when XDG_DATA_HOME is set.

socket login needs an interactive terminal. In CI, set the SOCKET_CLI_API_TOKEN environment variable instead. If the config is overridden with --config or SOCKET_CLI_CONFIG, the login is not saved.

socket login --help

$ socket login --help

  Setup Socket CLI with an API token and defaults

  Usage
    $ socket login [options]

  API Token Requirements
    - Quota: 1 unit

  Logs into the Socket API by prompting for an API token

  Options
    --api-base-url      API server to connect to for login
    --api-proxy         Proxy to use when making connection to API server

  Examples
    $ socket login
    $ socket login --api-proxy=http://localhost:1234

Updated about 2 months ago


Did this page help you?
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.