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

git push using ssh key doesn't work #6938

Closed
2 of 7 tasks
heavygit opened this issue May 13, 2019 · 6 comments
Closed
2 of 7 tasks

git push using ssh key doesn't work #6938

heavygit opened this issue May 13, 2019 · 6 comments

Comments

@heavygit
Copy link

heavygit commented May 13, 2019

  • Gitea version (or commit ref): 1.8.1 amd64
  • Git version: 2.21.0
  • Operating system: Linux / Clearlinux
  • 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:
    2019/05/13 22:01:54 [I] Log Mode: File(Debug)
    2019/05/13 22:01:54 [I] XORM Log Mode: File(Debug)
    2019/05/13 22:01:54 [I] Cache Service Enabled
    2019/05/13 22:01:54 [I] Session Service Enabled
    2019/05/13 22:01:54 [I] Beginning ORM engine initialization.
    2019/05/13 22:01:54 [I] ORM engine initialization attempt Rename import paths: "github.com/gogits/gogs" -> "github.com/go-gitea/gitea" #1/10...
    2019/05/13 22:01:55 [I] ORM engine initialization successful!
    2019/05/13 22:01:55 [I] Git Version: 2.21.0
    2019/05/13 22:01:55 [I] Git config user.name set to Gitea
    2019/05/13 22:01:55 [I] Git config user.email set to [email protected]
    2019/05/13 22:01:55 [I] SQLite3 Supported
    2019/05/13 22:01:55 [I] Run Mode: Production
    2019/05/13 22:01:57 [I] Listen: http://0.0.0.0:3000/git
    2019/05/13 22:01:57 [I] LFS server enabled
    2019/05/13 22:03:18 [D] Session ID: 9eedf4c79329c193
    2019/05/13 22:03:18 [D] CSRF Token: nc5w1Pl_7AZxIh0SiEWWxW3Nd6w6MTU1Nzc4NDk5ODUzOTM5NzYzMA==
    2019/05/13 22:03:18 [D] Session ID: 51b2c5c937025519
    2019/05/13 22:03:18 [D] CSRF Token: PfpUkTacs2eEXdh6e390AIvYMZ86MTU1Nzc4NDk5ODYzNjQ0MjkzNg==
    2019/05/13 22:04:55 [D] Session ID: 95c6160746303dde
    2019/05/13 22:04:55 [D] CSRF Token: R72mpYeBNXFcAmxHy_0zhaerNfQ6MTU1Nzc4NTA5NTYyNzg5MjcxMQ==
    2019/05/13 22:04:55 [D] Session ID: f6b412ea8293d149
    2019/05/13 22:04:55 [D] CSRF Token: C_97jIk-Ld2Kg-d8g0xkcRFdS8w6MTU1Nzc4NTA5NTY0MTE0NzcxNw==
    2019/05/13 22:04:56 [...routers/repo/http.go:211 HTTP()] [E] invalid credentials

Description

Using gitea in combination with apache mod_proxy while using HTTPS.
"git clone" using registered ssh key for authentication works correctly.
"git push" asks for password and "http.go:211 HTTP()] [E] invalid credentials" error message is written to log file.

Screenshots

N/A

@lunny
Copy link
Member

lunny commented May 14, 2019

Did you clone and push via SSH or HTTPS ?

@heavygit
Copy link
Author

heavygit commented May 14, 2019

clone and push were done via HTTPS

@zeripath
Copy link
Contributor

Could you check git remote -v ensure your remotes are using SSH

Are you running LFS? Check where the LFS is set for your clone.

@heavygit
Copy link
Author

Output from git remote -v
origin https://[email protected]/git/heavy/pokus.git (fetch)
origin https://[email protected]/git/heavy/pokus.git (push)
As I said, HTTPS was used for both of operations (clone, push).

No, LFS is not used.

@zeripath
Copy link
Contributor

Ok I'm confused - your issue title says that SSH key doesn't work but you're cloning and pushing via http.

@heavygit
Copy link
Author

No, I was confused. Of course you can use authentication using SSH keys while HTTP is being used.
The reason why clone worked is that repository hadn't been private.
Sorry guys for wasting your time.

@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

3 participants