Skip to content

Malformed URL exception while accessing Enterprise Repository and fetching data #526

@m00lecule

Description

@m00lecule

I am getting this exception, while trying to connect to remote repository.

Exception in thread "main" java.net.MalformedURLException: no protocol: github.XXXX.com/repos/ilmt/apar2github at java.net.URL.<init>(URL.java:593) at java.net.URL.<init>(URL.java:490) at java.net.URL.<init>(URL.java:439) at org.kohsuke.github.GitHub.getApiURL(GitHub.java:302) at org.kohsuke.github.Requester._to(Requester.java:280) at org.kohsuke.github.Requester.to(Requester.java:247) at org.kohsuke.github.GitHub.getRepository(GitHub.java:475)

and here is url where it is available:

https://github.XXXX.com/ilmt/apar2github

and code:

GitHub gh = GitHub.connectToEnterpriseWithOAuth(apiUrl, login, oAuth); GHRepository repository = gh.getRepository("ilmt/apar2github"); System.out.println(repository.getName());

and im using 1.95 version

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