File tree Expand file tree Collapse file tree 2 files changed +41
-1
lines changed Expand file tree Collapse file tree 2 files changed +41
-1
lines changed Original file line number Diff line number Diff line change 11laika.navigationOrder = [
22 index.md
33 site.md
4+ secrets.md
45 faq.md
56 customization.md
6- ]
7+ ]
Original file line number Diff line number Diff line change 1+ # Publishing Secrets
2+
3+ ## Generate a PGP key
4+
5+ Key generation occurs locally in your browser using [ OpenPGP.js] ( https://github.com/openpgpjs/openpgpjs ) .
6+
7+ <div >
8+ <
script src =
" https://cdn.jsdelivr.net/npm/[email protected] /dist/openpgp.min.js " ></
script >
9+ <script type =" text/javascript " >
10+ async function tlGenerateKey () {
11+ const project = document .getElementById (' project' ).value
12+ const email = document .getElementById (' email' ).value
13+ const { publicKey , privateKey } = await openpgp .generateKey ({
14+ userIDs: [{ name: ` ${ project} bot` , email }]
15+ });
16+ document .getElementById (' publicKey' ).value = publicKey;
17+ document .getElementById (' privateKey' ).value = btoa (privateKey);
18+ }
19+ </script >
20+
21+ <label for =" project " ><b >Your project name:</b ></label ><br />
22+ <input type =" text " id =" project " name =" project " size =" 64 " /><br />
23+ <label for =" email " ><b >Your email:</b ></label ><br />
24+ <input type =" text " id =" email " name =" email " size =" 64 " /><br />
25+ <button onClick =" tlGenerateKey ()" >Generate Key</button >
26+
27+ </div >
28+
29+ ### Public key
30+
31+ Copy-paste and submit your public key to the [ Ubuntu key server] ( https://keyserver.ubuntu.com/ ) .
32+
33+ <textarea id =" publicKey " readonly rows =" 16 " cols =" 64 " style =" resize : none ;" ></textarea >
34+
35+ ### Private key
36+
37+ Copy-paste and set your private key as the ` PGP_SECRET ` in your repository secrets.
38+
39+ <textarea id =" privateKey " readonly rows =" 16 " cols =" 64 " style =" resize : none ;" ></textarea >
You can’t perform that action at this time.
0 commit comments