SSH for Git


This is Nirmal and I’m working on a project called sorcia. It’s a minimal web frontend for Git repositories written in Go.

And I’m using Cloudflare to Proxy my A records for my domain

My problem is:
I need to login to my SSH server through [email protected] or using TCP protocol for git and do [email protected]. So that my users can do Git clone via either of those SSH commands.

By using Cloudflare Orange cloud, I suppose it cannot be done unless I use Cloudflare Spectrum to add a TCP protocol for git.

I checked this documentation, connecting ssh over git but it still requires Spectrum.

I cannot definitely afford for Spectrum which comes under Enterprise plan. Maybe I can use a “Pro” plan in the future if it is necessary.

So, my question briefly is - is it possible for me to do a workaround for this with orange cloud enabled?
So that, I can do git clone [email protected]:example-project.git.

To add further information, I’ve added a config file under .ssh directory as

    HostName <My IP Address>
    Port 22
    User git

and the default SSH port listens on another port 2022

Kind regards,

No, you wont get SSH to work in that setting. But Git supports HTTPS as well AFAIK and that should work.

The best approach would be probably however to simply go straight for the IP address or use an unproxied record.

Unproxied or go straight to the IP address are the same approach. Anyway, I’m going to disable the cloudflare orange cloud and I’m exposing my IP Address in both of the context you’ve mentioned.

Anyhow, thanks for confirming that I need Spectrum to do this. I’m contacting the Sales department to see if I can only enable Spectrum and get charged based on the usage. In other words, not subscribing for the entire Enterprise plan. Let’s see!

Kind regards,

This doesn’t require Spectrum, it can be done using Access which is available to customers on all plan types.

1 Like

Thanks for the reply… I checked with the customer support team today. Support engineer said that I need Spectrum for the use-case I’ve mentioned above.

I’ll look into the access documentation and get back. Thanks again!

Well, I checked it again. Access only provides certain Identity Providers. I’m basically using a username and password login. Which keep things simpler for the end-users.

So, it doesn’t work that way. Spectrum is exactly what I need and sadly it doesn’t come as a standalone product but with Enterprise plan.

As I said earlier, HTTPS should work in your case.

Sorry, that doesn’t answer my question.

In which way does it not?

As I said in my very first response, Git supports HTTPS. Cloudflare supports HTTPS. So you should be able to connect via HTTPS instead of SSH. How does this not answer the question?

Please look at the title and the description. I’m particularly asking for the SSH clone for Git repositories.

I know that HTTPS is an option. And I know that can be done.

Alright, if neither of both solutions is an option you can only either sign up for Spectrum or keep the service off Cloudflare.