<-- Back

Error when downloading app from Version Control: Repository path is not owned by current user

Issue

When downloading an app from Version Control, an error similar to the following is thrown and the app cannot be opened:

repository path 'C:/Users/Name/Mendix/AppNameExample/.git/' is not owned by current user

Environment

Version Control 

Cause

From Git 2.35.2, a new security feature was introduced to prevent a user from executing git commands in a repository owned by a different user. This is an issue if, for example, the admin account for a computer is owned by the IT for the organization, while the person utilizing the computer is only a user account. In this case, the owner of the .git folder may be the administrator instead of the user themself. 

To check the git version on a local machine, use a Command Line Interface and input the command git version. The output will include the git version.

Solution/Workaround

For the workaround, run the command git config --global --add safe.directory C:/APP_PATH  on the commandline. Input the appropriate path into the above command instead of C:/APP_PATH .

As a note, this command works on all subdirectories. For example, if all Mendix projects will live in a directory named Mendix, then run the command on the Mendix directory and all apps in that directory should work as expected.

To check if the command was run properly, run git config --global --get-all safe.directory on the commandline. The command should output the directory indicated earlier. 

Outcome

The directory the project is labeled as safe, and the project will open without error.

Internal information related

  • 237965 

Additional information 

Mendix documentation: Version Control 

Have more questions? Submit a request

0 Comments

Article is closed for comments.

To provide feedback, please open a ticket here. Don't forget to include the article's URL along with the feedback you would like to provide.