Created
          September 9, 2025 21:19 
        
      - 
      
 - 
        
Save falexandrou/854874bca638ebaf107066991953c4ac to your computer and use it in GitHub Desktop.  
    Get Sensitive configuration from 1Password
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #!/bin/bash | |
| if ! command -v op &>/dev/null; then | |
| echo "Error: 1password-cli (op) is not installed or not available in PATH" >&2 | |
| exit 1 | |
| fi | |
| eval $(op signin) | |
| op document get "SSH Config file" --output ~/.ssh/config --force | |
| op document get "Private SSH key" --output ~/.ssh/id_ed25519 --force | |
| op document get "Public SSH key" --output ~/.ssh/id_ed25519.pub --force | |
| op document get "AWS Config file" --output ~/.aws/config --force | |
| chmod 600 ~/.ssh/id_ed25519 | |
| chmod 644 ~/.ssh/id_ed25519.pub | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment