搜索

PythonReactSEOPDF
GitHub Skill

fnox-secrets

Manages fnox encrypted secrets for the micelio project. Use when setting up secrets, adding new environment variables, configuring deployment credentials, or troubleshooting fnox/age encryption.

pepicrft☆ 1 仓库 Stars0 仓库 Forks

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

查看来源 ↗使用指南

技能说明

fnox Secrets Management

This project uses fnox with age encryption to manage secrets. Secrets are encrypted in the repository and can be shared between local development and CI.

Configuration

  • Config file: fnox.toml in the project root
  • Age key location: ~/.config/fnox/micelio-age.txt
  • Public key: age147aml8dcjnfyj8gacmx8fvskkrg0gq9lfcrfvmquj28ft3rag5sqyq3nss

Current Secrets

Secret Purpose
KAMAL_REGISTRY_PASSWORD Docker registry authentication
POSTGRES_PASSWORD Database password
SECRET_KEY_BASE Phoenix secret key
SSH_PRIVATE_KEY Server SSH access for deployments

Common Commands

# List all secrets
fnox list

# Get a secret value (decrypted)
fnox get SECRET_NAME

# Set a new secret (interactive)
fnox set SECRET_NAME

# Set a secret from stdin
echo "value" | fnox set SECRET_NAME

# Run a command with secrets in environment
fnox exec -- command

Adding a New Secret

  1. Add the secret definition to fnox.toml:

    NEW_SECRET = { provider = "age" }
    
  2. Set the secret value:

    fnox set NEW_SECRET
    
  3. If needed in Kamal, add to config/deploy.yml:

    env:
      secret:
        - NEW_SECRET
    
  4. Commit fnox.toml (encrypted values are safe to commit)

Setting Up on a New Machine

  1. Get the age private key from a secure source (password manager, team member)

  2. Create the key file:

    mkdir -p ~/.config/fnox
    # Paste the key content into this file:
    vim ~/.config/fnox/micelio-age.txt
    chmod 600 ~/.config/fnox/micelio-age.txt
    
  3. Verify access:

    fnox list
    fnox get POSTGRES_PASSWORD
    

Setting Up GitHub Actions

  1. Copy the age private key:

    cat ~/.config/fnox/micelio-age.txt | pbcopy
    
  2. Add to GitHub:

    • Go to repository Settings > Secrets and variables > Actions
    • Create new secret named FNOX_AGE_KEY
    • Paste the key content

Generating Secure Values

# 32-byte hex string (good for passwords)
openssl rand -hex 32

# 64-byte hex string (good for secret keys)
openssl rand -hex 64

Troubleshooting

Error: "unknown field identity"

  • Use key_file instead of identity in fnox.toml

Error: "could not decrypt"

  • Verify the age key file exists at ~/.config/fnox/micelio-age.txt
  • Check file permissions: chmod 600 ~/.config/fnox/micelio-age.txt
  • Ensure you have the correct private key for this project

Secret not available in deployment

  • Verify it's listed in config/deploy.yml under env.secret
  • Ensure FNOX_AGE_KEY is set in GitHub Actions secrets

使用示例

查看来源仓库中的使用示例与配置说明。

查看来源 ↗

来源历史

收录时间
2026-01-20
索引更新时间
2026-01-26
Branch
main

收录与同步日期属于本站记录。源码修改历史请查看来源仓库。

GitHub ↗

chat Comments (0)

chat_bubble_outline

No comments yet. Be the first to share your thoughts!