Skip to content

Latest commit

 

History

History
66 lines (43 loc) · 2.19 KB

4.credential.md

File metadata and controls

66 lines (43 loc) · 2.19 KB

Credential uploading and acquisition

Please read the following carefully if you want to be a developer on Leviathan:

  • Upload SSH public key
  • Generate Token

Upload SSH public key

As developers of the Leviathan open source community, one need to upload SSH public key to the platform for user identity authentication. The following are the steps to generate the SSH public key and upload it to the platform.

  1. Check if a local public key file exists:

    Mac/Linux:

    cd ~/.ssh
    ls -la
    # If there is a .pub file (such as id_rsa.pub), there is no need to generate the SSH public key again.
    cat ~/.ssh/id_rsa.pub

    Windows:

    cd ~\.ssh	# username is the current Windows user name, please refer to Leviathan Documentation.
    dir
    # If there is a .pub file (such as id_rsa.pub), you do not need to make the SSH public key again.
    type ~\.ssh\id_rsa.pub
  2. Generating SSH key pair if not exists:

    Mac/Linux:

    $ ssh-keygen -t ecdsa -C "[email protected]"
    # It is not recommended to use the rsa encryption algorithm to generate a key pair, ecdsa is more secure and is supported by the new version of OpenSSL.

    Windows:

    $ ssh-keygen.exe # enter until the end
  3. Log in to Leviathan, in Account Setting - Public Key, click Create SSH public key, copy and paste the content of id_ed25519.pub file generated in the above steps.

Generate upload credentials

If developers want to publish toolkit package to the platform, one need to apply for an API Token.

  1. Log in to the Leviathan platform, in Account Settings - Developer Setting, click Generate token, Enter the name, select the expiration, and specify the namespace. The namespace can be empty (meaning that all namespaces are authorized)。

    Please safekeeping your token, it cannot be retrieved if lost !!!

  2. You need to set the environment variable LEVHUB_KEY to the token applied in the first step when uploading the package.
    # Example
    export LEVHUB_KEY=BzkVKv749U6UwjjRWsjBrVm4Y3ap6tpT4aT0WKfgcqTRG2PjT74djhaQV9AMDvjqQro25GgJ
    # Upload
    pdm lev upload