Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update instructions adding APT repo #5

Merged
merged 1 commit into from
Feb 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/content/doc/packages/debian.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ The following examples use `apt`.
To register the Debian registry add the url to the list of known apt sources:

```shell
echo "deb https://gitea.example.com/api/packages/{owner}/debian {distribution} {component}" >> /etc/apt/sources.list
echo "deb https://gitea.example.com/api/packages/{owner}/debian {distribution} {component}" | sudo tee -a /etc/apt/sources.list.d/gitea.list
```

| Placeholder | Description |
Expand All @@ -43,13 +43,13 @@ echo "deb https://gitea.example.com/api/packages/{owner}/debian {distribution} {
If the registry is private, provide credentials in the url:

```shell
echo "deb https://{username}:{password}@gitea.example.com/api/packages/{owner}/debian {distribution} {component}" >> /etc/apt/sources.list
echo "deb https://{username}:{password}@gitea.example.com/api/packages/{owner}/debian {distribution} {component}" | sudo tee -a /etc/apt/sources.list.d/gitea.list
```

The Debian registry files are signed with a PGP key which must be known to apt:

```shell
curl https://gitea.example.com/api/packages/{owner}/debian/repository.key | sudo apt-key add -
sudo curl https://gitea.example.com/api/packages/{owner}/debian/repository.key -o /etc/apt/trusted.gpg.d/gitea-{owner}.asc
```

Afterwards update the local package index:
Expand Down
4 changes: 2 additions & 2 deletions templates/package/content/debian.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<div class="ui form">
<div class="field">
<label>{{svg "octicon-terminal"}} {{.locale.Tr "packages.debian.registry"}}</label>
<div class="markup"><pre class="code-block"><code>curl {{AppUrl}}api/packages/{{$.PackageDescriptor.Owner.Name}}/debian/repository.key | sudo apt-key add -
echo "deb {{AppUrl}}api/packages/{{$.PackageDescriptor.Owner.Name}}/debian &lt;distribution&gt; &lt;component&gt;" >> /etc/apt/sources.list
<div class="markup"><pre class="code-block"><code>sudo curl {{AppUrl}}api/packages/{{$.PackageDescriptor.Owner.Name}}/debian/repository.key -o /etc/apt/trusted.gpg.d/gitea-{{$.PackageDescriptor.Owner.Name}}.asc
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed this because there isn't much display space at that page:
grafik
But sure, I can change it back.

echo "deb {{AppUrl}}api/packages/{{$.PackageDescriptor.Owner.Name}}/debian &lt;distribution&gt; &lt;component&gt;" | sudo tee -a /etc/apt/sources.list.d/gitea.list
sudo apt update</code></pre></div>
<p>{{.locale.Tr "packages.debian.registry.info" | Safe}}</p>
</div>
Expand Down