Page 1 of 1

Git Staging Checkout Branch disabled

Posted: Thu Jul 16, 2020 5:43 pm
by kmank
I have an issue where the Checkout branch field of the Clone Repository dialog is disabled.
Image

Of course, it doesn't have a branch to pull from so nothing is pulled.

Can anyone help troubleshoot this?

Re: Git Staging Checkout Branch disabled

Posted: Mon Jul 20, 2020 2:20 pm
by alex_jitianu
Hello,

The branch combo should activate once you paste an URL to Git repository in the Repository URL field. If that doesn't happen, there's usually a red error label that appears above the buttons, in the dialog. DO you see such a error message?

You can also try starting Oxygen from the command line (using oxygen.bat or oxygen.sh). Open the Clone dialog again and paste the repository URL. Check the console for any errors.

Re: Git Staging Checkout Branch disabled

Posted: Tue Jul 21, 2020 8:07 pm
by kmank
Thanks for the reply, Alex. I guess I should have been more explicit.

I am aware of how this should work as I have been able to get it to work in a test environment VM. Essentially, placing the URL in the Repository URL field does not cause the Checkout branch field to activate (again, it works fine in the test environment). I also do not receive an error in the dialog at all.

Here is the exception that appears in the console:

Exception in thread "Check Repo URL Connection Daemon" java.lang.ClassCastException: ro.sync.net.protocol.http.WebdavHttpURLConnection cannot be cast to javax.net.ssl.HttpsURLConnection
at org.eclipse.jgit.transport.http.JDKHttpConnection.configure(JDKHttpConnection.java:238)
at org.eclipse.jgit.util.HttpSupport.disableSslVerify(HttpSupport.java:307)
at org.eclipse.jgit.transport.TransportHttp.httpOpen(TransportHttp.java:879)
at org.eclipse.jgit.transport.TransportHttp.connect(TransportHttp.java:500)
at org.eclipse.jgit.transport.TransportHttp.openFetch(TransportHttp.java:359)
at org.eclipse.jgit.api.LsRemoteCommand.execute(LsRemoteCommand.java:167)
at org.eclipse.jgit.api.LsRemoteCommand.call(LsRemoteCommand.java:128)
at com.oxygenxml.git.service.GitAccess.doListRemoteBranchesInternal(GitAccess.java:928)
at com.oxygenxml.git.service.GitAccess.listRemoteBranchesForURL(GitAccess.java:888)
at com.oxygenxml.git.view.dialog.CloneRepositoryDialog$2$1.addBranches(CloneRepositoryDialog.java:305)
at com.oxygenxml.git.view.dialog.CloneRepositoryDialog$2$1.run(CloneRepositoryDialog.java:262)
at java.util.TimerThread.mainLoop(Unknown Source)
at java.util.TimerThread.run(Unknown Source)

Hopefully, this helps to troubleshoot further.

Re: Git Staging Checkout Branch disabled

Posted: Wed Jul 22, 2020 8:19 am
by alex_jitianu
Hi,

I believe the http.sslVerify is disabled and because of that the exception is thrown. You can enable (which is the default mode) it by running:

Code: Select all

git config http.sslVerify "true"
I will add an issue to investigate and fix this situation on our side.

Best regards,
Alex

Re: Git Staging Checkout Branch disabled

Posted: Wed Jul 22, 2020 3:41 pm
by kmank
A bit of a Catch-22 there. In order to run the git config statement, I need to run it from a git directory. In order to be in a git directory, I need to clone the repository. Unless I am misunderstanding something?

Re: Git Staging Checkout Branch disabled

Posted: Wed Jul 22, 2020 4:10 pm
by alex_jitianu
Hello,

I think this is a global setting, that you are having. You can run that command from anywhere, assuming you have a command line git client. Alternatively, you can manually edit the global configuration file which is located at:

Code: Select all

C:\Users\{user}\.gitconfig
Best regards,
Alex

Re: Git Staging Checkout Branch disabled

Posted: Wed Jul 22, 2020 5:31 pm
by kmank
Changing the global setting did resolve the issue.

my .gitconfig file now has the following:
[http]
sslVerify = true


Thanks very much!

Re: Git Staging Checkout Branch disabled

Posted: Thu Jul 23, 2020 2:24 am
by chrispitude
Nice detective work!