Skip to content

GitHub.connectAnonymously() fails because of a lack of credentials. #39

@Omertron

Description

@Omertron

Using the following line:

GitHub github = GitHub.connectAnonymously();

Generates:
Exception in thread "main" java.lang.IllegalStateException: This operation requires a credential but none is given to the GitHub constructor
at org.kohsuke.github.GitHub.requireCredential(GitHub.java:197)
at org.kohsuke.github.GitHub.getMyself(GitHub.java:228)
at org.kohsuke.github.GitHub.(GitHub.java:127)
at org.kohsuke.github.GitHub.(GitHub.java:74)
at org.kohsuke.github.GitHub.connectAnonymously(GitHub.java:192)
at com.omertron.githubtest.GitHubTest.(GitHubTest.java:16)
at com.omertron.githubtest.App.main(App.java:8)

Note: I do not have a ".github" file in my user directory (nor do I want one, I just want to be able to access github anon from my code)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions