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

Gitea refuses SSH connections when using valid public keys #12667

Closed
2 of 7 tasks
bkraul opened this issue Aug 31, 2020 · 3 comments · Fixed by #12668
Closed
2 of 7 tasks

Gitea refuses SSH connections when using valid public keys #12667

bkraul opened this issue Aug 31, 2020 · 3 comments · Fixed by #12668

Comments

@bkraul
Copy link

bkraul commented Aug 31, 2020

  • Gitea version (or commit ref): afd89b1 (and 58f57b3)
  • Git version: 1.13.0+dev-496
  • Operating system:
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL): N/A, SSH issue.
    • No
    • Not relevant
  • Log gist:

Description

Commits afd89b1 (and 58f57b3) have an issue where all public SSH keys are rejected. This does not happen with commit f8601f3. I have been able to test this on try.gitea.io, and this is the error I get:

git clone [email protected]:bkraul/TestProject.git
Cloning into 'TestProject'...
fatal: 'bkraul/TestProject.git' does not appear to be a git repository
Gitea: Internal error
Failed to execute git command: exit status 128
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

The repository does exist and the public SSH key is valid.

Screenshots

image
image

@zeripath
Copy link
Contributor

Without logs we cannot assess further. We need the logs from the running gitea server.

@bkraul
Copy link
Author

bkraul commented Aug 31, 2020

This was done on try.gitea.io. I can send you mine, but I don't see much on there, tbh.

@bkraul
Copy link
Author

bkraul commented Aug 31, 2020

This is all I get. These are 2 tries to do a git pull action (some info modified for privacy):

Server listening on :: port 22.
Server listening on 0.0.0.0 port 22.
2020/08/31 11:04:51 cmd/web.go:108:runWeb() [I] Starting Gitea on PID: 17
2020/08/31 11:04:51 ...dules/setting/git.go:93:newGit() [I] Git Version: 2.26.2, Wire Protocol Version 2 Enabled
2020/08/31 11:04:51 routers/init.go:123:GlobalInit() [T] AppPath: /app/gitea/gitea
2020/08/31 11:04:51 routers/init.go:124:GlobalInit() [T] AppWorkPath: /app/gitea
2020/08/31 11:04:51 routers/init.go:125:GlobalInit() [T] Custom path: /data/gitea
2020/08/31 11:04:51 routers/init.go:126:GlobalInit() [T] Log path: /data/gitea/log
Accepted publickey for git from 192.168.0.x port 61025 ssh2: RSA SHA256:******************
[Macaron] 2020-08-31 11:05:19: Started GET /api/internal/serv/command/11/bkraul/project?mode=1&verb=git-upload-pack for 127.0.0.1
[Macaron] 2020-08-31 11:05:19: Completed GET /api/internal/serv/command/11/bkraul/project?mode=1&verb=git-upload-pack 200 OK in 11.462804ms
Received disconnect from 192.168.0.x port 61025:11: disconnected by user
Disconnected from user git 192.168.0.x port 61025
Accepted publickey for git from 192.168.0.x port 61036 ssh2: RSA SHA256:***************
[Macaron] 2020-08-31 11:06:46: Started GET /api/internal/serv/command/11/bkraul/project?mode=1&verb=git-upload-pack for 127.0.0.1
[Macaron] 2020-08-31 11:06:46: Completed GET /api/internal/serv/command/11/bkraul/project?mode=1&verb=git-upload-pack 200 OK in 10.37227ms
Received disconnect from 192.168.0.x port 61036:11: disconnected by user
Disconnected from user git 192.168.0.x port 61036

zeripath added a commit to zeripath/gitea that referenced this issue Aug 31, 2020
go-gitea#12624 missed lowering the provided repoPath.

(Additionally make a few fixes to the way the debug flag works.)

Fix go-gitea#12659
Fix go-gitea#12667

Signed-off-by: Andrew Thornton <[email protected]>
zeripath added a commit that referenced this issue Aug 31, 2020
#12624 missed lowering the provided repoPath.

(Additionally make a few fixes to the way the debug flag works.)

Fix #12659
Fix #12667

Signed-off-by: Andrew Thornton <[email protected]>
@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

Successfully merging a pull request may close this issue.

2 participants