WebsiteTemplate/cheatsheets/pass.html
2026-01-25 11:33:37 -04:00

181 lines
6.7 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'; style-src 'self'; font-src 'self' data:; img-src 'self' data:; connect-src 'self'; base-uri 'self'; form-action 'self' https://defcon.social https://bsky.app;">
<meta http-equiv="X-Content-Type-Options" content="nosniff">
<link rel="stylesheet" href="../assets/css/style.css">
<link rel="icon" type="image/x-icon" href="../favicon.ico">
<script>
// Apply theme immediately to prevent flash
(function() {
const theme = localStorage.getItem('theme') ||
(window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light');
document.documentElement.setAttribute('data-theme', theme);
})();
</script>
<title>pass Cheatsheet - Launch Pad</title>
</head>
<body>
<button class="theme-toggle" id="themeToggle" aria-label="Toggle dark mode">
<svg class="theme-icon theme-icon-moon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path></svg>
<svg class="theme-icon theme-icon-sun" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="display: none;"><circle cx="12" cy="12" r="5"></circle><line x1="12" y1="1" x2="12" y2="3"></line><line x1="12" y1="21" x2="12" y2="23"></line><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line><line x1="1" y1="12" x2="3" y2="12"></line><line x1="21" y1="12" x2="23" y2="12"></line><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line></svg>
</button>
<br/><br/>
<div class="name">
__ _______________________ _________._________________________
\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/
| __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_
| \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \
\___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ /
\/ \/ \/ \/ \/ \/ \/
</div>
<div class="blog-page-header">
<div class="blog-header-content">
<a href="/cheatsheets" class="back-link" title="Back to Cheatsheets">
<svg xmlns="http://www.w3.org/2000/svg" width="42" height="42" viewBox="0 0 24 24" class="home-icon"><path fill="currentColor" d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/></svg>
</a>
<h1 class="blog-page-title">pass Cheatsheet</h1>
</div>
</div>
<div class="blog-post-container">
<div class="blog-posts-container" style="max-width: 900px; margin: 0 auto;">
<div class="blog-post">
<div class="blog-post-content">
<p><a href="index.html">← Back to cheatsheets</a></p>
<p><a href="../index.html">← Home</a></p>
<hr>
<p>pass is the standard unix password manager. It stores passwords in GPG-encrypted files organized in a directory tree. Simple, secure, and works with git for syncing.</p>
<hr>
<h2>Initialization</h2>
<ul>
<li>pass init &lt;gpg-id&gt; - Initialize password store with GPG key</li>
</ul>
<ul>
<li>pass git init - Initialize git repository in password store</li>
</ul>
<ul>
<li>~/.password-store/ - Default password store location</li>
</ul>
<hr>
<h2>Basic Operations</h2>
<ul>
<li>pass - Show list of passwords</li>
</ul>
<ul>
<li>pass &lt;entry&gt; - Show password for entry</li>
</ul>
<ul>
<li>pass -c &lt;entry&gt; - Copy password to clipboard</li>
</ul>
<ul>
<li>pass insert &lt;entry&gt; - Insert new password (prompts)</li>
</ul>
<ul>
<li>pass generate &lt;entry&gt; &lt;length&gt; - Generate random password</li>
</ul>
<ul>
<li>pass rm &lt;entry&gt; - Remove password entry</li>
</ul>
<ul>
<li>pass mv &lt;old&gt; &lt;new&gt; - Rename/move entry</li>
</ul>
<ul>
<li>pass cp &lt;old&gt; &lt;new&gt; - Copy entry</li>
</ul>
<hr>
<h2>Password Generation</h2>
<ul>
<li>pass generate &lt;entry&gt; 20 - Generate 20-character password</li>
</ul>
<ul>
<li>pass generate -n &lt;entry&gt; 16 - Generate without symbols</li>
</ul>
<ul>
<li>pass generate -c &lt;entry&gt; 24 - Generate and copy to clipboard</li>
</ul>
<ul>
<li>pass generate -i &lt;entry&gt; - Interactive generation</li>
</ul>
<hr>
<h2>Multi-line Entries</h2>
<ul>
<li>pass insert -m &lt;entry&gt; - Insert multi-line entry</li>
</ul>
<ul>
<li>First line is password, additional lines are metadata</li>
</ul>
<ul>
<li>pass edit &lt;entry&gt; - Edit entry with $EDITOR</li>
</ul>
<hr>
<h2>Git Integration</h2>
<ul>
<li>pass git init - Initialize git repo</li>
</ul>
<ul>
<li>pass git push - Push to remote</li>
</ul>
<ul>
<li>pass git pull - Pull from remote</li>
</ul>
<ul>
<li>pass git log - Show commit history</li>
</ul>
<hr>
<h2>Common Examples</h2>
<h3>Initialize Store</h3>
<pre><code>pass init your@email.com</code></pre>
<p>Initialize password store with your GPG key.</p>
<h3>Generate Password</h3>
<pre><code>pass generate -c websites/github.com 32</code></pre>
<p>Generate and copy 32-character password.</p>
<h3>Retrieve Password</h3>
<pre><code>pass websites/github.com</code></pre>
<p>Show password for entry.</p>
<h3>Copy to Clipboard</h3>
<pre><code>pass -c websites/github.com</code></pre>
<p>Copy password to clipboard (clears after 45 seconds).</p>
<h3>Multi-line Entry</h3>
<pre><code>pass insert -m accounts/example.com
# Enter password, then username, then notes</code></pre>
<p>Create entry with password and metadata.</p>
<h3>Git Sync</h3>
<pre><code>pass git init
pass git remote add origin git@example.com:pass.git
pass git push</code></pre>
<p>Set up git sync for password store.</p>
<hr>
<h2>Tips</h2>
<ul>
<li>Organize passwords in directories (websites/, servers/, etc.)</li>
</ul>
<ul>
<li>Use -c flag to copy passwords without displaying them</li>
</ul>
<ul>
<li>First line of entry is the password, rest is metadata</li>
</ul>
<ul>
<li>Git integration makes it easy to sync across devices</li>
</ul>
<ul>
<li>Works great with browser extensions (passff, browserpass)</li>
</ul>
<ul>
<li>Use pass-otp for TOTP codes</li>
</ul>
<ul>
<li>Simple, auditable, and secure</li>
</ul>
</div>
</div>
</div>
</div>
<script async type="text/javascript" src="../blog/analytics.js"></script>
<script src="../theme.js"></script>
</body>
</html>