2017-11-27 03:14:32 +05:30
|
|
|
---
|
|
|
|
date: "2016-11-08T16:00:00+02:00"
|
|
|
|
title: "Troubleshooting"
|
|
|
|
slug: "troubleshooting"
|
|
|
|
weight: 10
|
|
|
|
toc: true
|
|
|
|
draft: false
|
|
|
|
menu:
|
|
|
|
sidebar:
|
2018-01-09 04:18:42 +05:30
|
|
|
parent: "help"
|
2017-11-27 03:14:32 +05:30
|
|
|
name: "Troubleshooting"
|
|
|
|
weight: 20
|
|
|
|
identifier: "troubleshooting"
|
|
|
|
---
|
|
|
|
|
|
|
|
# Troubleshooting
|
|
|
|
|
2018-01-09 04:18:42 +05:30
|
|
|
This page contains some common seen issues and their solutions.
|
2017-11-27 03:14:32 +05:30
|
|
|
|
|
|
|
## SSH issues
|
|
|
|
|
2018-01-09 04:18:42 +05:30
|
|
|
For issues reaching repositories over `ssh` while the gitea web front-end, but
|
|
|
|
`https` based git repository access works fine, consider looking into the following.
|
2017-11-27 03:14:32 +05:30
|
|
|
|
|
|
|
```
|
|
|
|
Permission denied (publickey).
|
|
|
|
fatal: Could not read from remote repository.
|
|
|
|
```
|
|
|
|
|
2018-01-09 04:18:42 +05:30
|
|
|
This error signifies that the server rejected a log in attempt, check the
|
2017-11-27 03:14:32 +05:30
|
|
|
following things:
|
|
|
|
|
|
|
|
* On the client:
|
|
|
|
* Ensure the public and private ssh keys are added to the correct Gitea user.
|
2018-01-09 04:18:42 +05:30
|
|
|
* Make sure there are no issues in the remote url, ensure the name of the
|
2017-11-27 03:14:32 +05:30
|
|
|
git user (before the `@`) is spelled correctly.
|
2018-01-09 04:18:42 +05:30
|
|
|
* Ensure public and private ssh keys are correct on client machine.
|
|
|
|
* Try to connect using ssh (ssh git@myremote.example) to ensure a connection
|
|
|
|
can be made.
|
2017-11-27 03:14:32 +05:30
|
|
|
* On the server:
|
2018-01-09 04:18:42 +05:30
|
|
|
* Make sure the repository exists and is correctly named.
|
|
|
|
* Check the permissions of the `.ssh` directory in the system user's home directory.
|
2017-11-27 03:14:32 +05:30
|
|
|
* Verify that the correct public keys are added to `.ssh/authorized_keys`.
|
|
|
|
Try to run `Rewrite '.ssh/authorized_keys' file (for Gitea SSH keys)` on the
|
|
|
|
Gitea admin panel.
|
2018-01-09 04:18:42 +05:30
|
|
|
* Read gitea logs.
|
|
|
|
* Read /var/log/auth (or similar).
|
|
|
|
* Check permissions of repositories.
|
2017-11-27 03:14:32 +05:30
|
|
|
|
2018-01-09 04:18:42 +05:30
|
|
|
The following is an example of a missing public SSH key where authentication
|
|
|
|
succeeded, but some other setting is preventing SSH from reaching the correct
|
|
|
|
repository.
|
2017-11-27 03:14:32 +05:30
|
|
|
|
|
|
|
```
|
|
|
|
fatal: Could not read from remote repository.
|
|
|
|
|
|
|
|
Please make sure you have the correct access rights
|
|
|
|
and the repository exists.
|
|
|
|
```
|
|
|
|
|
|
|
|
In this case, look into the following settings:
|
|
|
|
|
|
|
|
* On the server:
|
2018-01-09 04:18:42 +05:30
|
|
|
* Make sure that the `git` system user has a usable shell set
|
|
|
|
* Verify this with `getent passwd git | cut -d: -f7`
|
|
|
|
* `usermod` or `chsh` can be used to modify this.
|
2017-11-27 03:14:32 +05:30
|
|
|
* Ensure that the `gitea serv` command in `.ssh/authorized_keys` uses the
|
2018-01-09 04:18:42 +05:30
|
|
|
correct configuration file.
|
2018-04-21 06:52:02 +05:30
|
|
|
|
|
|
|
## Missing releases after migrating repository with tags
|
|
|
|
|
|
|
|
To migrate an repository *with* all tags you need to do two things
|
|
|
|
|
|
|
|
* Push tags to the repository:
|
|
|
|
```
|
|
|
|
git push --tags
|
|
|
|
```
|
|
|
|
|
|
|
|
* (Re-)sync tags of all repositories within gitea:
|
|
|
|
```
|
|
|
|
gitea admin repo-sync-releases
|
|
|
|
```
|