Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 094514f

Browse filesBrowse files
committed
Merge pull request hub4j#36 from spiffxp/require-credentials-fix
Allow oauthToken to be used without login
2 parents fab9687 + 716bfd4 commit 094514f
Copy full SHA for 094514f

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed

‎src/main/java/org/kohsuke/github/GitHub.java

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GitHub.java
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ public static GitHub connectAnonymously() throws IOException {
193193
}
194194

195195
/*package*/ void requireCredential() {
196-
if (login==null || encodedAuthorization==null)
196+
if (login==null && encodedAuthorization==null)
197197
throw new IllegalStateException("This operation requires a credential but none is given to the GitHub constructor");
198198
}
199199

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.