看官方api,https://developer.github.com/changes/2020-02-10-deprecating-auth-through-query-param/
修改代码
Request request = new Request.Builder()
.url("https://api.github.com/user?access_token=" + accessToken)
.build();
为
Request request = new Request.Builder()
.url("https://api.github.com/user")
.header("Authorization","token "+accessToken)
.build();