Mint Your RIK
Minting your Repository Identity Key (RIK) takes a few minutes. It lets your GitHub repository register its identity on-chain using a GitHub Actions OIDC token, certifying Proof-of-Ownership by issuing a unique on-chain token only the repo owner can mint.
Network
FCF is currently testing on Base Sepolia. Everything below runs against the testnet, so you only need a small amount of Base Sepolia ETH.
Before you start
You will need:
- A GitHub repository you own and can push to.
- A Base Sepolia RPC URL (e.g. from Alchemy, Infura, or a public node).
- Some Base Sepolia ETH to cover gas.
- The
fcfCLI installed globally:
npm install --global @freecodexyz/cli@alphaYou should also be authenticated to GitHub in your local environment so the CLI can talk to the GitHub API (it uses your gh auth or GH_TOKEN / GITHUB_TOKEN).
1. Create and link a wallet
From the local clone of the repository you want to register:
fcf wallet createThis generates a fresh wallet and stores its private key locally. The address is printed to stdout.
fcf wallet linkThis saves the wallet's private key as a GitHub Actions repository secret in the current repo (default secret name: FCF_PRIVATE_KEY). The workflow we generate next will read it.
2. Point the CLI at the RIK contract
Set the contract address and your Base Sepolia RPC URL as GitHub Actions repository variables:
fcf github vars set FCF_CONTRACT 0xc03a52cD0EB2d5d456e64bda0557Db04608d1eac
fcf github vars set FCF_RPC_URL <your-base-sepolia-rpc-url>The latest known RIK contract address on Base Sepolia is:
0xc03a52cD0EB2d5d456e64bda0557Db04608d1eac(Always cross-check this against Protocol → Deployments.)
3. Scaffold the registration workflow
fcf initThis writes .github/workflows/fcf-register.yml to your repo. The workflow uses workflow_dispatch (manual trigger) and has id-token: write so it can request a GitHub OIDC token. The full template is shown in fcf init.
4. Fund the wallet
The wallet that you created in step 1 is the wallet that will sign the on-chain register() call. It needs Base Sepolia ETH.
If you don't already have some, grab it from a Base Sepolia faucet.
5. Commit, push, and dispatch
Commit the new workflow file and push:
git add .github/workflows/fcf-register.yml
git commit -m "ci: add fcf register workflow"
git pushThen in GitHub UI:
- Open the Actions tab.
- Pick the Register Repository workflow.
- Click Run workflow.
The workflow will:
- Ask GitHub for an OIDC token, with
audset to the lowercase Ethereum address of your wallet. - Run
fcf registerwith that token and the contract address. - Wait for the transaction receipt and print the result.
If everything goes well, you now hold the RIK for that repository. Your wallet address is the on-chain owner of the ERC-721 token whose tokenId equals the GitHub repository_id.
What to check after minting
- The transaction succeeded on Base Sepolia Basescan. The
RepoRegisteredevent will be in the logs. - The Registry will index your RIK on the next indexer tick. You can also list registrations directly from the CLI:
fcf list --contract 0xc03a52cD0EB2d5d456e64bda0557Db04608d1eacTroubleshooting
See Troubleshooting for the common failures: missing OIDC env vars, aud mismatch, expired token, unknown kid, already-registered repo.