It’s Cybersecurity Awareness Month! Join our interactive training session, or learn about security and AI from 1Password experts.
Forum Discussion
Former Member
3 years agoUnable to generate password on GitHub Actions usin OP CLI tool
I'm using OP CLI tool to generate passwords for automating the creation of .jks files for Android builds over GitHub Actions.
Locally I've created a script that is doing everything that is needed a...
Nhat_Nguyen
1Password Team
3 years agoHello @adi9090,
From your descriptions, it seems 1Password couldn’t authenticate your credentials in GitHub Actions.
For more information, 1Password CLI works on your computer because it can connect with the desktop app for authentication, but for it to run in GitHub Actions, we will need some additional commands to add your account manually.
That said, let us try these steps under jobs to see if it works. I am running the latest macOS, but you can use the steps here to install 1Password on Ubuntu.
env:
EMAIL: ${{ secrets.EMAIL }}
SECRET_KEY: ${{ secrets.SECRET_KEY }}
PASSWORD: ${{ secrets.PASSWORD }}
steps:
- uses: actions/checkout@v3
- name: install 1password
run: brew install --cask 1password/tap/1password-cli
- name: start op
run: |
eval $(echo “$PASSWORD” | op account add --address my.1password.com --email “$EMAIL” --secret-key “$SECRET_KEY”)
eval $(echo “$PASSWORD” | op signin)
op item create --category=password --title=“GeneratedPassword” --vault=“Test” --generate-password=’20,letters,digits