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

Installation on Mac via brew set my .gitconfig to be owned by root #443

Closed
nipunn1313 opened this issue Sep 30, 2020 · 6 comments
Closed
Labels
no-activity Stale issue or PR that will be automatically closed soon.

Comments

@nipunn1313
Copy link

Potentially some git config command was run as root during installation?
Can dig into it more if it's hard to repro, but wanted to throw the issue up here first.

@derrickstolee
Copy link
Contributor

What specifically do you mean, your .gitignore? Perhaps you instead mean your ~/.gitconfig file? That would certainly be unfortunate, so we should look into that.

@nipunn1313
Copy link
Author

Yes! It was .gitconfig! Sorry mistyped when typing up the report!

@nipunn1313 nipunn1313 changed the title Installation on Mac via brew set my .gitignore to be owned by root Installation on Mac via brew set my .gitconfig to be owned by root Oct 1, 2020
@nipunn1313
Copy link
Author

One specific thing about my setup - is that my ~/.gitconfig is a symlink to another location (target) - specifically within my Dropbox folder.

During installation, the target location became owned by root.

I ended up noticing, because Dropbox yelled about not having ownership to .gitconfig

@mjcheetham
Copy link
Member

mjcheetham commented Oct 1, 2020

This is probably GCM Core that's writing to your ~/.gitconfig, and not necessarily Scalar.

The scalar and scalar-azrepos Casks require installation as root because root is required to install the internal .pkg file.
These Casks depend on GCM Core (git-credential-manager-core), which is therefore also installed as root. GCM Core as a postinstall action calls git config --global ... ... which, being run as root, will change the ownership of the ~/.gitconfig file.

We need a way to have these post install actions not run as root OR change the GCM Core Cask to run gcm configure --system which will update the git config --system config file (/etc/gitconfig).

cc: @derrickstolee

@github-actions
Copy link

Labeling this issue as stale. There has been no activity for 30 days. Remove stale label or comment or this issue will be closed in 7 days.

@github-actions github-actions bot added the no-activity Stale issue or PR that will be automatically closed soon. label Dec 30, 2020
@derrickstolee
Copy link
Contributor

Closing in favor of git-ecosystem/git-credential-manager#186.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-activity Stale issue or PR that will be automatically closed soon.
Projects
None yet
Development

No branches or pull requests

3 participants