4

I am no longer able to push to github via Android Studio. Everytime I try I now get this error message:

The operation couldn't be completed. Unable to locate a Java Runtime. Please visit http://www.java.com for information on installing Java. error: failed to push some refs to 'github.com:xxxxxxxxxx'

Not sure what caused the issue, just started happening one morning (although it was after updating Android Studio to Bumblebee).

I can use the terminal to push just fine, but would really like to get this issue fixed as it's just an easier workflow.

2
  • 1
    It's strange that Java isn't found, considering the whole thing runs in Java. Anyways, try going to Settings > Version Control > Git and check Use credential helper. Commented Jan 27, 2022 at 15:06
  • 1
    Well it just randomly started working again -- Not sure if it's because of something I did or if there was an update elsewhere that fixed it. If this occurs to anyone else, try setting the Gradle JDK to a downloaded version rather than using the AS version. Commented Jan 27, 2022 at 18:26

1 Answer 1

7

Enable -> Use credential helper

Android Studio Settings

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.