0

I search many questions, like this Configuring Git over SSH but the answers just configure the remote URI for a particular project. I want a global effect.

What I want is when I clone over HTTPs

git clone https://github.com/octocat/Spoon-Knife.git

and git will transform the call into SSH

git clone git@github.com:octocat/Spoon-Knife.git

How to do this ?

Community
  • 1
  • 1
onmyway133
  • 45,645
  • 31
  • 257
  • 263
  • 1
    I doubt that there is a good way to do what you are asking. HTTPS and SSH are different protocols. There is nothing guaranteeing that a Git server will provide both, and there is no general way to translate between equivalent URLs. Why can't you just use the SSH URL when you initially clone a repository? – ChrisGPT was on strike Oct 12 '14 at 03:13
  • @Chris I use Cocoapods, they use clone over HTTPs – onmyway133 Oct 12 '14 at 04:01

0 Answers0