如何解决github帐户的ssh问题
我最近使用网站上建议的步骤向我的github帐户添加了一个ssh密钥。
当我尝试从我所属的组织克隆存储库时,收到以下错误消息:
ERROR: Repository not found.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
我很确定自己具有正确的访问权限,因为我可以使用HTTPS进行克隆。
有人知道这个问题的简单解决方案吗?
解决方法
首先,确保使用的URL是正确的(区分大小写),并使用用户'<label class="mdc-text-field mdc-text-field--outlined">
<span class="mdc-notched-outline">
<span class="mdc-notched-outline__leading"></span>
<span class="mdc-notched-outline__notch">
<span class="mdc-floating-label" id="my-label-id">OpenWeatherMap API key</span>
</span>
<span class="mdc-notched-outline__trailing"></span>
</span>
<input type="text" class="mdc-text-field__input" aria-labelledby="my-label-id" style="width: 512px;">
</label>
<br>
<button class="mdc-button mdc-button--raised">
<span class="mdc-button__label">Grant location permision</span>
</button>
<script>
mdc.ripple.MDCRipple.attachTo(document.querySelector('.mdc-button')); <!-- This does not work>
mdc.textField.MDCTextField.attachTo(document.querySelector('.mdc-text-field')); <!-- This works fine>
</script>
'(而不是您的GitHub帐户名)
git
第二,如果问题仍然存在,请遵循Troubleshooting SSH
- 私钥可能是使用密码创建的(这意味着您需要ssh-agent)
- 可以定义环境变量
git clone git@github.com:<aUser>/<aRepository> ^^^^
(并引用openssh以外的内容) - ...