Skip to content

How can I override the home path during Repo() creation due to unsafe repository (REPO is owned by someone else) error #1428

@avatar-lavventura

Description

@avatar-lavventura

I am using git version 2.35.2. I want to apply following solution How can I specify custom global gitconfig path? due to this error fatal: unsafe repository (REPO is owned by someone else) with ubuntu 20.04 (Related: actions/checkout#760).

HOME=/home/marco/.silly/ git commit -m "silly configuration"

Is it possible to do same work around during Repo createtion, where I can override the home path?

The way I create my repo in python:
repo = git.Repo(".", search_parent_directories=True) here could I send HOME as an env variable?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions