C
C
crows2016-07-25 17:15:09
git
crows, 2016-07-25 17:15:09

Cloning a repository using only a .pub file?

I have a .pub file and a repository address like [email protected]:wordpress . How can I clone this repository using this .pub file?
TortoiseGit requires a private key, but I don't have one. I opened Putty Key Generator and I see that I can generate a public/private pair (but I already have a public key), or I can upload a private key (but I don't have it yet).

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrey, 2016-07-25
@VladimirAndreev

without a private key, the public key cannot be used, since the private key certifies that you are the owner of the public...

D
Danil Biryukov-Romanov, 2016-07-25
@urtow

TL; DR - None.
People from the other side have been stubborn with substances, and such that I'm interested. And here's why:
A brief digression into cryptography. There is symmetric encryption - this is when data can be encrypted and decrypted with the same key. This case does not interest us.
We are interested in asymmetric encryption. What is it? The fact that there are two keys - public (it is sometimes called public) and private (called private). Public key, you can encrypt data and onlyencrypt. With a private key, you can only decrypt the data. It's math and it's cool (read about RSA if you're interested in how it works). Tsimes is that the private key cannot be obtained in any way from the public key. On modern hardware. Even in theory.
So, the whole thing is necessary in order to transfer the PUBLIC key to the other side via an insecure communication channel (Internet), the other side encrypts the data with this key and returns it to us in encrypted form. And we, the name of the private key - decrypt this data. The private key does not leave our computer and is not available to someone who can intercept all traffic.
How does public key authentication work (generally) in repositories
- You pass your PUBLIC key to the repository
- The repository encrypts with this key a message like "Number 235823598712409, encrypt it with this key <key here> and return it to me"
- You decrypt the message, encrypt it with the received key and give it back.
- The repository checks if the answer is correct, and if so, then data is already being exchanged, since you both have each other's public encryption keys.
All this naturally happens automatically, you don't need to do anything with your hands :)
So, for successful work, you need BOTH keys.
Therefore, generate a new key pair and give your .pub key to the repository admins.
And tell them that they are drug addicts

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question