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

Git can't find the application #36

Closed
aotongarcia opened this issue Sep 10, 2023 · 4 comments · May be fixed by #37
Closed

Git can't find the application #36

aotongarcia opened this issue Sep 10, 2023 · 4 comments · May be fixed by #37

Comments

@aotongarcia
Copy link

aotongarcia commented Sep 10, 2023

Hey there, I came across this repository through gitea/issues/25189. I tried following your instructions but I can't get Git to find the application. I am on a Windows host, both git and git-credential-oauth.exe are in my system path. However, when following the repo instructions

Then test that Git can find the application: 
git credential-oauth

I get the following error

git credential-oauth configure
git: 'credential-oauth' is not a git command. See 'git --help'.

If I run git-credential-oauth configure --verbose I see it actually making changes to my .gitconfig file. Is there something I am missing?

@hickford
Copy link
Owner

both git and git-credential-oauth.exe are in my system path

Are git.exe and git-credential-oauth.exe in the same directory? You can check with where git and where git-credential-oauth. I recall there's some subtlety about the security of Git running a command in a different directory.

A workaround is to edit credential.helper in .gitconfig to specify the absolute path to git-credential-oauth.

@aotongarcia
Copy link
Author

They are not in the same path, I didn't think to even do that - let me give it a try

@aotongarcia
Copy link
Author

Looks like we are in business!

image

I'm happy to create a PR to update README.md for the Windows instructions :)

@hickford
Copy link
Owner

I recall there's some subtlety about the security of Git running a command in a different directory.

I wonder if this is specific to Git for Windows or could also apply on Linux? I can't find any documentation.

@hickford hickford closed this as not planned Won't fix, can't repro, duplicate, stale Aug 5, 2024
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

Successfully merging a pull request may close this issue.

2 participants