Before you can publish nanopublications, you need to set up your profile with RSA keys and your ORCID iD.
Run the interactive setup command:
python3 -m nanopub setup --newkeysThis will:
- Ask for your ORCID iD (e.g.,
https://orcid.org/0000-0000-0000-0000) - Ask for your name
- Generate new RSA keys automatically (with
--newkeysflag) - Store the configuration in
~/.nanopub/
Important: Make sure to use the --newkeys flag so it generates the RSA keys for you!
Check that your profile is configured correctly:
python3 -m nanopub profileThis should show your ORCID iD and key paths.
If you prefer to generate keys manually first:
# Create the directory
mkdir -p ~/.nanopub
# Generate RSA key pair
ssh-keygen -t rsa -b 4096 -f ~/.nanopub/id_rsa -N ""
# Then run setup pointing to these keys
python3 -m nanopub setup \
--orcid-id "https://orcid.org/YOUR-ORCID-ID" \
--name "Your Name" \
--keypair ~/.nanopub/id_rsa.pub ~/.nanopub/id_rsaError: FileNotFoundError for id_rsa.pub
If you see this error, it means the RSA keys haven't been generated yet. Run:
python3 -m nanopub setup --newkeysError: Permission denied
Make sure the ~/.nanopub/ directory has the correct permissions:
chmod 700 ~/.nanopub
chmod 600 ~/.nanopub/id_rsa # Private key should be read-only by owner
chmod 644 ~/.nanopub/id_rsa.pub # Public key can be readableOnce setup is complete, you can use the batch publishing scripts:
# Preview what would be published
./publish_batch.sh --dry-run
# Publish to test server
./publish_batch.sh --test
# Publish to production
./publish_batch.sh --prod