[Solved] Git Clone Error: Please make sure you have the correct access rights and the repository exists.

git clone [email protected]:mypy/testproject.git


Cloning into 'testproject'...
[email protected]: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

When it is determined that the SSH key has been configured on the server side, but still cannot be cloned, the following reasons need to be analyzed:

Execution:

ssh -Tvvv [email protected]

....
debug1: Connecting to test.com[36.99.xxx.xx] port 22.
....

During git clone, SSH protocol is used to connect the server and the default port 22 is used. When the company uses intranet penetration software such as NPs or FRP to map out, the intranet server does not use the standard port 22, so the port needs to be specified during git clone

git clone ssh://[email protected]:22222/mypy/testproject.git

Similar Posts: