Skip to content

Deploy key doesn't work in multiple repositories (rw / r) #3959

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 7 tasks
FloMiau opened this issue May 13, 2018 · 3 comments
Closed
2 of 7 tasks

Deploy key doesn't work in multiple repositories (rw / r) #3959

FloMiau opened this issue May 13, 2018 · 3 comments
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented type/enhancement An improvement of existing functionality

Comments

@FloMiau
Copy link

FloMiau commented May 13, 2018

  • Gitea version (or commit ref): 1546458 / 1.4.1
  • Git version: 2.7.4
  • Operating system: Ubuntu 16.04.4 LTS
  • 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:
xorm.log
2018/05/13 11:50:57 [I] [SQL] SELECT `id`, `key_id`, `repo_id`, `name`, `fingerprint`, `mode`, `created_unix`, `updated_unix` FROM `deploy_key` WHERE (key_id = ? AND repo_id = ?) LIMIT 1 []interface {}{3, 8}

Description

I tried to add a deploy key with different read/write settings to multiple repositories:

  1. add deploy key to repository 1 as read/write
  2. add same deploy key to repository 2 as read

Result:
deploy key in repository 1 works
deploy key in repository 1 doesn't work

git clone git@try.gitea.io:flori/test1.git
Cloning into 'test1'...
The authenticity of host 'try.gitea.io (2604:a880:400:d1::6b0:2001)' can't be established.
ECDSA key fingerprint is SHA256:ZALpHWW7Q1lMvG/9K2EJPApn6XiO4hx2/PN/zWcY7CI.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'try.gitea.io,2604:a880:400:d1::6b0:2001' (ECDSA) to the list of known hosts.
remote: Counting objects: 5, done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 5 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (5/5), done.
Checking connectivity... done.
Cloning into 'test2'...
Gitea: Key access denied
Deploy key access denied: [key_id: 247, repo_id: 5568]
fatal: Could not read from remote repository.

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

Screenshots

gitea1
gitea2

@lafriks lafriks added the type/enhancement An improvement of existing functionality label May 13, 2018
@lafriks
Copy link
Member

lafriks commented May 13, 2018

Currently it is not supported to reuse key on multiple repositories

@stale
Copy link

stale bot commented Jan 27, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale stale bot added the issue/stale label Jan 27, 2019
@lunny lunny added issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented and removed issue/stale labels Feb 7, 2019
@zeripath
Copy link
Contributor

This should be fixed by #5939

Therefore I'm going to close this.

@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
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented type/enhancement An improvement of existing functionality
Projects
None yet
Development

No branches or pull requests

4 participants