You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<h2>{% trans %}Using this token{% endtrans %}</h2>
66
+
67
+
<p>{% trans %}To use this API token:{% endtrans %}</p>
68
+
69
+
<ul>
70
+
<li>{% trans token='__token__' %}Set your username to <code>{{ token }}</code>{% endtrans %}</li>
71
+
<li>{% trans prefix='pypi-' %}Set your password to the token value, including the <code>{{ prefix }}</code> prefix{% endtrans %}</li>
72
+
</ul>
73
+
74
+
{% if macaroon.caveats.permissions == "user" %}
75
+
76
+
<p>
77
+
{% trans trimmed href='https://pypi.org/project/virtualenv/', filename='$HOME/.pypirc' %}
78
+
For example, if you are using <ahref="{{ href }}">Twine</a> to upload your projects to PyPI, set up your <code>{{ filename }}</code> file like this:
79
+
{% endtrans %}
80
+
</p>
81
+
<preclass="code-block">
82
+
[pypi]
83
+
username = __token__
84
+
password = {{ serialized_macaroon }}</pre>
85
+
{% else %}
86
+
<p>
87
+
{% trans trimmed href='https://pypi.org/project/virtualenv/', filename='$HOME/.pypirc' %}
88
+
For example, if you are using <ahref="{{ href }}">Twine</a> to upload multiple projects to PyPI, you can set up your <code>{{ filename }}</code> file like this:
89
+
{% endtrans %}
90
+
</p>
91
+
<preclass="code-block">
92
+
[pypi]
93
+
username = __token__
94
+
password = # {% trans %}either a user-scoped token or a project-scoped token you want to set as the default{% endtrans %}
{% trans trimmed command='twine --repository PROJECT_NAME' %}
101
+
You can then use <code>{{ command }}</code> to switch to the correct token when uploading to PyPI.
102
+
{% endtrans %}
103
+
</p>
104
+
{% endif %}
105
+
106
+
<p>{% trans href='/help#apitoken' %}For further instructions on how to use this token, <ahref="{{ href }}">visit the PyPI help page</a>.{% endtrans %}</p>
65
107
</section>
108
+
<hr>
66
109
{% endif %}
67
110
68
111
{{ form_error_anchor(create_macaroon_form) }}
@@ -111,7 +154,7 @@ <h2>{% trans %}Add another token{% endtrans %}</h2>
0 commit comments