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

Use gitoxide for Git config #10

Open
paulyoung opened this issue Feb 6, 2023 · 2 comments
Open

Use gitoxide for Git config #10

paulyoung opened this issue Feb 6, 2023 · 2 comments

Comments

@paulyoung
Copy link
Member

It would be preferable to use gitoxide's Git config implementation as it's surely more robust than what's currently in place. That should be considered as ad-hoc and a temporary workaround.

// TODO: figure out why this doesn't find the setting when used with `git -c`
// let private_key_path = config.string("icp.privateKey").ok_or_else(|| {
// anyhow!("failed to read icp.privateKey from git config. Set with `git config --global icp.privateKey <path to private key>`")
// })?;

@Byron – do you have any suggestions here? This isn't urgent but it would be a nice change (see below)

Once the custom config options we require in the icp namespace are confirmed as working using gitoxide (if possible) we should investigate if git -c http.proxy=http://localhost:9091 -c http.sslCAinfo=~/.proxyman/proxyman-ca.pem <command> then "just works" or if supporting that requires further changes.

@Byron
Copy link

Byron commented Feb 7, 2023

Since you use git-repository and presumably instantiate a Repository at some point, that .config_snapshot() can be used to access all on-disk configuration accordingly.

The -c parameter is tricky I checked the -c parameter and noticed that it is storing it in the GIT_CONFIG_PARAMETERS environment variable in a custom-quoted format which should make it possible to read it back to make it available via git-config.

@Oyase-shinobi
Copy link

Hello @paulyoung
I have checked this project and very interested in this
this project is very good
I would love to engage in your team and contribute in this project

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants