Skip to content

New git security policy safe.directory (eg: 1.16.6 docker image) makes pushing fails #19455

Closed
@Nuklon

Description

@Nuklon

Description

Since upgrading to 1.16.6, every push fails with the following error:

git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks push -v origin master:master
fatal: credential-cache unavailable; no unix socket support
POST git-receive-pack (2733 bytes)
remote: 
remote: Gitea: Internal Server Error        

In docker console this is logged:

Failed to open repository: Git/Data Error: exit status 128 - fatal: unsafe repository ('/data/git/repositories/git/data.git' is owned by someone else)

Downgrading to 1.16.5 makes it work again. UI works in 1.16.6 and also allows me to browse the files in this repository (or any other, all have this push error).

Gitea Version

1.16.6

Can you reproduce the bug on the Gitea demo site?

No

How are you running Gitea?

Windows Server 2022 + Docker. Windows 10 + Docker has the same problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue/workaroundit is or has a workaroundtopic/securitySomething leaks user information or is otherwise vulnerable. Should be fixed!type/bug

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions