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

authorized_keys (external SSH) #9458

Closed
2 of 7 tasks
HowToMeetLadies opened this issue Dec 21, 2019 · 1 comment
Closed
2 of 7 tasks

authorized_keys (external SSH) #9458

HowToMeetLadies opened this issue Dec 21, 2019 · 1 comment

Comments

@HowToMeetLadies
Copy link

HowToMeetLadies commented Dec 21, 2019

  • Gitea version (or commit ref): Gitea version 1.10.1 built with GNU Make 4.1, go1.13.4 : bindata, sqlite, sqlite_unlock_notify
  • Git version: git version 2.11.0
  • Operating system: Debian Stretch - Linux HOSTNAME 5.1.14-xen #5114 SMP Sat Jun 22 15:59:13 CEST 2019 x86_64 GNU/Linux
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:
HOSTNAME:/home/git$ gitea -c /etc/gitea/app.ini admin regenerate keys
2019/12/21 19:58:54 ...dules/setting/git.go:87:newGit() [I] Git Version: 2.11.0
2019/12/21 19:58:54 .../xorm/session_raw.go:76:queryRows() [I] [SQL] SELECT `id`, `owner_id`, `name`, `fingerprint`, `content`, `mode`, `type`, `login_source_id`, `created_unix`, `updated_unix` FROM `public_key` - took: 1.897202ms
HOSTNAME:/home/git$ cat .ssh/authorized_keys
HOSTNAME:/home/git$

Description

I have two keys in my account. The link on the administration page reports success, but the file remains empty.

The same via the command line: no error, empty file.

Permissions are correct. Gitea on the command line would criticize this - tested it.

SELECT * FROM public_key;
Nothing.

Gitea starts with gitea.service and gitea.main.socket and everything else appears to be working as far as it is.

In gitea.service I also removed USER and HOME from the environment, but no change. (#5795)

/etc/passwd: git:x:UID:GID:Git Version Control,,,:/home/git:/bin/bash

There is only one gitea.db in the whole system: /var/lib/gitea/data/gitea.db.

Screenshots

gitea

app.ini

APP_NAME = git
RUN_USER = git
RUN_MODE = prod

[oauth2]
JWT_SECRET = affeaffedeadbeefcafebabe

[security]
INTERNAL_TOKEN = affeaffedeadbeefcafebabe
INSTALL_LOCK   = true
SECRET_KEY     = affeaffedeadbeefcafebabe

[database]
DB_TYPE  = sqlite3
HOST     = 127.0.0.1:3306
NAME     = gitea
USER     = gitea
PASSWD   =
SSL_MODE = disable
CHARSET  = utf8
PATH     = /var/lib/gitea/data/gitea.db

[repository]
ROOT = /home/git/gitea-repositories

[server]
SSH_DOMAIN       = localhost
DOMAIN           = localhost
HTTP_PORT        = 8081
ROOT_URL         = https://your.domain/
DISABLE_SSH      = false
SSH_PORT         = 22
LFS_START_SERVER = true
LFS_CONTENT_PATH = /var/lib/gitea/data/lfs
LFS_JWT_SECRET   = affeaffedeadbeefcafebabe
OFFLINE_MODE     = false

[mailer]
ENABLED = false

[service]
REGISTER_EMAIL_CONFIRM            = false
ENABLE_NOTIFY_MAIL                = false
DISABLE_REGISTRATION              = true
ALLOW_ONLY_EXTERNAL_REGISTRATION  = false
ENABLE_CAPTCHA                    = false
REQUIRE_SIGNIN_VIEW               = true
DEFAULT_KEEP_EMAIL_PRIVATE        = true
DEFAULT_ALLOW_CREATE_ORGANIZATION = false
DEFAULT_ENABLE_TIMETRACKING       = true
NO_REPLY_ADDRESS                  = noreplay.your.domain

[picture]
DISABLE_GRAVATAR        = false
ENABLE_FEDERATED_AVATAR = true

[openid]
ENABLE_OPENID_SIGNIN = false
ENABLE_OPENID_SIGNUP = false

[session]
PROVIDER = file

[log]
MODE      = file
LEVEL     = info
ROOT_PATH = /var/lib/gitea/log

[indexer]
REPO_INDEXER_ENABLED = true
REPO_INDEXER_PATH = indexers/repos.bleve
UPDATE_BUFFER_LEN = 20
MAX_FILE_SIZE = 1048576
REPO_INDEXER_INCLUDE =
REPO_INDEXER_EXCLUDE = **/bin/**,**/sbin/**,**/lib/**

What's wrong here?

P.S: HOSTNAME, UID, GID have been replaced by me.

@HowToMeetLadies
Copy link
Author

Shame on me. The url (nginx) pointed to another machine. faceplause

It runs all the time. Please excuse the disturbance.

I am a former gitolite user and it was perfectly fine there, but gitea is simply awesome.

🥇

@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant