File: 04-Account-Setup.html

package info (click to toggle)
gcli 2.3.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,096 kB
  • sloc: ansic: 19,013; makefile: 312; yacc: 261; sh: 142; lex: 53
file content (92 lines) | stat: -rw-r--r-- 3,097 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<!DOCTYPE html>

<html>
	<head>
	<title>GCLI Tutorial | Setting up an account</title>
	<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
	<link rel="prev" href="03-Find-Documentation.html" />
	<link rel="next" href="{{NEXTURL}}" />
	<!-- Shamelessly stolen from: http://bettermotherfuckingwebsite.com/ -->
	<style>
		body {
			margin:5% auto;
			background: #f2f2f2;
			color: #444444;
			font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
			font-size: 16px;
			line-height: 1.8;
			text-shadow: 0 1px 0 #ffffff; max-width: 73%;
		}
		pre {
			line-height: 1.0;
		}
		a {
			border-bottom: 1px solid #444444;
			color: #444444;
			text-decoration: none;
		}
		a:hover {
			border-bottom: 0;
		}
	</style>
</head>

<body>
<nav style=text-align:right>
<a href="03-Find-Documentation.html" title="How to find documentation">⇐ Previous</a>
<a href="index.html">Table of contents</a>
<a href="05-Creating-an-issue.html" title="Creating an issue">Next ⇒</a>
</nav>
<hr />
<h1>Setting up gcli for use with an account</h1>
<p>Creating issues on Github requires an account which we need to
generate an authentication token for gcli.</p>
<p>Log into your GitHub account and click on your account icon in the top
right corner. Then choose the <code>Settings</code> option. Scroll down and
choose <code>Developer settings</code> on the bottom of the left column. Under
<code>Personal access tokens</code> choose <code>Tokens (classic)</code>.</p>
<p>Click on <code>Generate new token (classic)</code>.</p>
<p>Set a useful name such as <code>gcli</code> in the Note field, set the expiration
to <code>No expiration</code> and allow the following <code>Scopes</code>:</p>
<ul>
<li><code>repo</code></li>
<li><code>workflow</code></li>
<li><code>admin:public_key</code></li>
<li><code>gist</code></li>
</ul>
<p>Then create the token. It'll be printed in green. Do not share it!</p>
<p>Now we need to tell gcli about this new token. To do this, create
a configuration file for gcli - on Windows you need to do this from
the MSYS2 Shell:</p>
<pre><code>$ mkdir -p ${HOME}/.config/gcli
$ vi ${HOME}/.config/gcli/config
</code></pre>
<p>Obviously, you can choose any other editor of your choice. Put the
following into this file:</p>
<pre><code>defaults {
    editor=vi
    github-default-account=my-github-account
}

my-github-account {
    token=&lt;token-goes-here&gt;
    account=&lt;account-name&gt;
    forge-type=github
}
</code></pre>
<p>Replace the <code>&lt;token-goes-here&gt;</code> with the previously generated token
and the <code>&lt;account&gt;</code> with your account name.</p>
<p>If you now run</p>
<pre><code>$ gcli -t github repos
</code></pre>
<p>you should get a list of your repos. If not, check again that you did
all the steps above correctly.</p>
<br />
<hr />
<nav style=text-align:right>
<a href="03-Find-Documentation.html" title="How to find documentation">⇐ Previous</a>
<a href="index.html">Table of contents</a>
<a href="05-Creating-an-issue.html" title="Creating an issue">Next ⇒</a>
</nav>
</body>
</html>