Closed mydiemho closed 4 years ago
@mydiemho : Thanks for reporting this. I was able to reproduce this. Although the JHipster app is authorized properly it shows this error it seems. Will take a look. :thinking:
Just for the information; as pointed out in this comment; https://github.com/jhipster/jhipster-online/issues/93#issuecomment-663868193, this also applies to GitLab.
@SudharakaP, what error do you see in server logs?
@vishal423 : The error is,
Seems like something to do with CORS. :thinking:
I did a quick check on local setup, and able to configure GitHub
without any issues or additional configurations. Have you tried on local setup to reproduce the issue?
I did a quick check on local setup, and able to configure
GitHub
without any issues or additional configurations. Have you tried on local setup to reproduce the issue?
@vishal423 : That's strange. I created my own OAuth App and OAuth Token and tested it on local and I could recreate this exact scenario. Even the error is the same. :wink: :thinking: :thinking:
@vishal423 : Hmm.... :thinking: :thinking: Kinda confusing why this happens on some machines,
@vishal423 : can you try running the prod profile and see if it works? :thinking:
Because I have a feeling that since dev profile has all CORS enabled that might be why it's working. I'll try the dev profile as well in a minute; need to take a break. :smile:
@vishal423 : For me it fails for dev as well. :disappointed:
It seems to me that this intermittent issue of Git Sync on both GitHub and GitLab comes from way we send the POST request to the Git provider using the RestTemplate
library. I cannot pinpoint why it fails only for some people but I felt that its something to do with the library itself so I changed it to the more recent HttpClient
of Java 11. And thus the project was also upgraded to Java 11. Please take a look and let me know if you see any issues; I tested this on my side several times to make sure and seems everything works fine, but given that it wasn't working for some people I would appreciate if you can test it on your end as well if the sync is working as expected. :smile:
cc: @vishal423
@mydiemho : I just released v2.6.4 which includes the fix for this. If you even encounter this issue again please feel free to let us know. :smile:
cc: @tonsV2
Thanks both of you for reporting this issue. :smile:
Hi, I am encountering this problem.
Additionally, although I receive access tokens on GitHub, I cannot list or select repositories.
After configure JHipster to access my GitHub account, I keep seeing the error
JHipster has failed to reach your Github repositories.
. When I checked on GitHub, I can see thatJHipster
is in theAuthorized OAuth Apps
list.