Git Staging Checkout Branch disabled

<oXygen/> general issues.
kmank
Posts: 108
Joined: Mon Apr 19, 2010 5:33 pm

Git Staging Checkout Branch disabled

Post by kmank » Thu Jul 16, 2020 5:43 pm

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?

alex_jitianu
Posts: 779
Joined: Wed Nov 16, 2005 11:11 am

Re: Git Staging Checkout Branch disabled

Post by alex_jitianu » Mon Jul 20, 2020 2:20 pm

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.

kmank
Posts: 108
Joined: Mon Apr 19, 2010 5:33 pm

Re: Git Staging Checkout Branch disabled

Post by kmank » Tue Jul 21, 2020 8:07 pm

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.

alex_jitianu
Posts: 779
Joined: Wed Nov 16, 2005 11:11 am

Re: Git Staging Checkout Branch disabled

Post by alex_jitianu » Wed Jul 22, 2020 8:19 am

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

kmank
Posts: 108
Joined: Mon Apr 19, 2010 5:33 pm

Re: Git Staging Checkout Branch disabled

Post by kmank » Wed Jul 22, 2020 3:41 pm

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?

alex_jitianu
Posts: 779
Joined: Wed Nov 16, 2005 11:11 am

Re: Git Staging Checkout Branch disabled

Post by alex_jitianu » Wed Jul 22, 2020 4:10 pm

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

kmank
Posts: 108
Joined: Mon Apr 19, 2010 5:33 pm

Re: Git Staging Checkout Branch disabled

Post by kmank » Wed Jul 22, 2020 5:31 pm

Changing the global setting did resolve the issue.

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


Thanks very much!

chrispitude
Posts: 222
Joined: Thu May 02, 2019 2:32 pm

Re: Git Staging Checkout Branch disabled

Post by chrispitude » Thu Jul 23, 2020 2:24 am

Nice detective work!

Post Reply