Skip to content

Repo keeps being 'bare' even if it is not #521

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

Closed
2 of 6 tasks
typeless opened this issue Dec 28, 2016 · 5 comments
Closed
2 of 6 tasks

Repo keeps being 'bare' even if it is not #521

typeless opened this issue Dec 28, 2016 · 5 comments
Labels
issue/not-a-bug The reported issue is the intended behavior or the problem is not inside Gitea

Comments

@typeless
Copy link
Contributor

typeless commented Dec 28, 2016

  • Gitea version (or commit ref):
$ ./gitea --version
Gitea version 6aacf4d
  • Git version:
$ git --version
git version 2.7.4
  • Operating system:
$ cat /etc/os-release
NAME="Ubuntu"
VERSION="16.04.1 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.1 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:
$ sudo journalctl -u gitea
Dec 28 15:24:05 DIR-101 gitea[26904]: [Macaron] 2016-12-28 15:24:05: Started GET /mura/repo-manifests for 192.168.222.65
Dec 28 15:24:05 DIR-101 gitea[26904]: 2016/12/28 15:24:05 [D] Session ID: 18e0d643614cbd89
Dec 28 15:24:05 DIR-101 gitea[26904]: 2016/12/28 15:24:05 [D] CSRF Token: vbaOsqCBITYP1Sg1-JR3E0CfNCOOMTQ4MjkwMTIyMjQ1Mjk2MjkwNg==
Dec 28 15:24:05 DIR-101 gitea[26904]: 2016/12/28 15:24:05 [D] Bare repository: /mura/repo-manifests
Dec 28 15:24:05 DIR-101 gitea[26904]: 2016/12/28 15:24:05 [D] Template: repo/bare
Dec 28 15:24:05 DIR-101 gitea[26904]: [Macaron] 2016-12-28 15:24:05: Completed /mura/repo-manifests 200 OK in 25.286817ms

Description

It shows the 'Quick Guide' page like I had never pushed any file.
I looked into the code by finding the string Bare repo and the symbol IsBare and found there is not many way to set it to false (The expected correct value). Not sure what's going on but literally I can not add any new repo from now on.

P.S.

  1. This can be reproduced with HEAD (f686a32),
  2. Using SQLite from shell to read data/gogs.db, it shows the column is_bare of the repo is actually 1.
$ sqlite3 data/gogs.db

In SQLite:

sqilte> select is_bare from repository where name == "repo-manifests";
1
  1. It appears that this happens only when git push with SSH and HTTP does not exhibit the problem.
@lunny lunny added this to the 1.1.0 milestone Dec 28, 2016
@lunny
Copy link
Member

lunny commented Dec 28, 2016

Hi, I cannot reproduce this. Could you give any further information?

@typeless
Copy link
Contributor Author

typeless commented Dec 28, 2016

@lunny I am trying to diagnose the problem further. Can you enlighten me about where the entry point is when users doing git push via SSH?

I suppose it is gitea serv (cmd/serve.go) but I am not sure since I didn't see the logging message I added there. 😕

@lunny
Copy link
Member

lunny commented Dec 28, 2016

Yes, you are right. When push via SSH, gitea serv will be invoked. Config file is ~/.ssh/authorized_keys file. You can find command="/Users/lunny/gopath/src/code.gitea.io/gitea/gitea serv key-1 ..., the default log will be write to log/serv.log. And notice don't print anything to console.

@bkcsoft
Copy link
Member

bkcsoft commented Dec 28, 2016

Push via SSH does through cmd/update.go (called from .git/hooks/update :)

@typeless
Copy link
Contributor Author

typeless commented Dec 29, 2016

It turns out this is caused by ~/.ssh/authorized_keys which has to be regenerated. (Thanks Denis Denisov @denji).

This can be closed.

@tboerger tboerger removed this from the 1.1.0 milestone Jan 16, 2017
@go-gitea go-gitea locked and limited conversation to collaborators Nov 23, 2020
@delvh delvh added issue/not-a-bug The reported issue is the intended behavior or the problem is not inside Gitea and removed reviewed/invalid labels Oct 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/not-a-bug The reported issue is the intended behavior or the problem is not inside Gitea
Projects
None yet
Development

No branches or pull requests

5 participants