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

Failing to push through Android studio #2345

Closed
doraba opened this issue Oct 3, 2019 · 13 comments
Closed

Failing to push through Android studio #2345

doraba opened this issue Oct 3, 2019 · 13 comments

Comments

@doraba
Copy link

doraba commented Oct 3, 2019

Hello, I'm new to this community and I need some help.
I'm trying to push a local Android project through Android studio to a Github repo and this is the message I get at the event log:
Push failed
Warning: failed to restrict file handles (87)
handle #0: 0000000000000144 (type 3, handle info (1) 0
handle #1: 00000000000001b4 (type 3, handle info (1) 1
handle #2: 0000000000000a54 (type 3, handle info (1) 1
This is a bug; please report it at
https://github.com/git-for-windows/git/issues/new
To suppress this warning, please set the environment variable
SUPPRESS_HANDLE_INHERITANCE_WARNING=1
remote: Repository not found.
Authentication failed for 'https://github.com/doraba/my-application.git/'

What should I do?

@landstander668
Copy link

My first guess would be that you have an out-of-date version of Git for Windows installed, as "failed to restrict file handles" was a commonly-reported issue from a few releases back. If so, you likely just need to install the latest version.

If you try running git version --build-options at a command prompt, what's the output?

@dscho
Copy link
Member

dscho commented Oct 3, 2019

My guess is that the credential helper is disabled for some reason (and yes, we should not show that warning in that case, but we haven't had any luck to figure out what is going wrong yet, there is simply too little information to go on).

Also: it is not the best idea to delete the bug reporting template. It is designed to help provide better reports, and I think it would have helped here. The problem could be related to the Windows version, for example.

@doraba
Copy link
Author

doraba commented Oct 3, 2019

landstander668, It seems like I already have the latest one.
Screenshot_1

dscho, I'm completely new to git & GitHub so I don't know how can I check the credential helper status.

I'd like to mention here that, I can do commits through Android Studio but push gives me the above error. Though, I can do push through the git bash. My aim is to achieve both of them within the Android studio.

@dscho
Copy link
Member

dscho commented Oct 3, 2019

I don't know how can I check the credential helper status.

git config credential.helper

It might make sense to give calling git config credential.helper manager in your worktree a try.

@doraba
Copy link
Author

doraba commented Oct 3, 2019

dscho, this is what I get
Screenshot_2

@dscho
Copy link
Member

dscho commented Oct 3, 2019 via email

@doraba
Copy link
Author

doraba commented Oct 3, 2019

dscho, I didn't think of that, I apologize. The image was just this:
$ git config credential.helper
manager

For the moment, I'm ok with pushing through the bash shell,
but I would really appreciate any help tomorrow.

@doraba
Copy link
Author

doraba commented Oct 3, 2019

Contrary to that case, git does not ask me for credentials whenever I clone, push etc through the git bash shell and everything works fine. The problem occurs only in the Android studio when I'm trying to push, although I have put already my username & password at Settings --> Version Control -->GitHub

@dscho
Copy link
Member

dscho commented Oct 4, 2019

Sorry, I have no idea how to debug this. If it works in Git Bash, and not in Android Studio, it strikes me as a bug in IntelliJ rather than Git for Windows, too...

@doraba
Copy link
Author

doraba commented Oct 4, 2019

Yes, it is quite strange. Thank you for trying though.

@doraba
Copy link
Author

doraba commented Oct 4, 2019

@dscho reading your previous comments and searching about it, I finally managed to find the solution. I had to go to File --> Settings --> Git and check the "Use credential helper" checkbox.
Now I am pushing successfully. Thanks to your intuition!

@dscho
Copy link
Member

dscho commented Oct 4, 2019

I am glad you found it, and equally happy that you let us know! Now other users hitting the same snag have a chance to find your solution.

As the problem is solved for now, let's close this ticket?

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

4 participants