Git error: “Please make sure you have the correct access rights and the repository exists”

后端 未结 27 916
面向向阳花
面向向阳花 2020-12-12 14:49

I am using TortoiseGit on Windows. When I am trying to Clone from the context menu of the standard Windows Explorer, I get this error:

Please make sur

相关标签:
27条回答
  • 2020-12-12 15:18

    You are trying to clone the repository over ssh: git@arobotdev..., and your SSH keys are not properly set on server. There are multiple reasons to this:

    1. Your public key might not be saved in authorized_keys file of user git
    2. If 1 is not true the Your private key is not saved in .ssh/ folder of your HOMEDIR.
    3. Permissions are not properly set

    If all 3 above are untrue then my only conclusion can be to try: git@arobotdev:AlfaRobot.git Assuming AlfaRobot.git is in HOMEDIR of git user and not inside a folder called git which resides in HOMEDIR of user git.

    0 讨论(0)
  • 2020-12-12 15:19

    An alternative problem may be your internet connection. Obvious maybe, but took me a few minutes to figure out my wifi was down :)

    0 讨论(0)
  • 2020-12-12 15:20

    I experienced this issue when I had an invalid RSA SSH key, and a valid ED25519 SSH key on my machine. I believe Gitlab was checking the RSA key, failing and stopping there before checking the ED25519 key.

    I fixed this by deleting both of the keys I had on my device and generating a new RSA SSH, and providing that too gitlab.

    0 讨论(0)
  • 2020-12-12 15:21

    Try to use HTTPS instead SSH while taking clone from GIT, use this Url for take clone , you can use Gitbase, Android Studio or any other tool for clone the branch.

    0 讨论(0)
  • 2020-12-12 15:23

    Very common mistake was done by me. I copied using clip command xclip -sel clip < ~/.ssh/id_rsa.pub, but during pasting into github key input box, I removed last newline using backspace, which actually changed the public key.

    So, always copy & paste ssh public key as it is without removing last newline.

    0 讨论(0)
  • 2020-12-12 15:24

    This can also happen if you are connecting to your git repository through a VPN. Make sure that you are connected to the VPN which is used to access the resources of your organization.

    0 讨论(0)
提交回复
热议问题