相关疑难解决方法(0)

GitHub错误消息 - 权限被拒绝(publickey)

有人看到这个错误,知道该怎么办?

我正在使用终端,我在根目录,GitHub存储库存在,我现在不知道该怎么做.

> git push -u origin master
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
Run Code Online (Sandbox Code Playgroud)

git github

684
推荐指数
20
解决办法
86万
查看次数

使用Git时如何解决Permission denied(publickey)错误?

我在Mac Snow Leopard上,我刚刚安装完毕git.

我刚试过

git clone git@thechaw.com:cakebook.git
Run Code Online (Sandbox Code Playgroud)

但这给了我这个错误:

Initialized empty Git repository in `/Users/username/Documents/cakebook/.git/`
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
Run Code Online (Sandbox Code Playgroud)

我错过了什么?
我也尝试过ssh-keygen没有passphase,但仍然是同样的错误.

git ssh ssh-keys public-key

582
推荐指数
26
解决办法
89万
查看次数

ssh github 有效,但 git push 无效。

我从未遇到过 ssh 工作和 git 不以这种方式工作的情况。不知道如何排除故障。

ssh 似乎工作(-T防止第一行):

iam@heeere:/e/.ssh$ ssh github
PTY allocation request failed on channel 0
Hi bradyt! You've successfully authenticated, but GitHub does not provide shell access.
Connection to github.com closed.
Run Code Online (Sandbox Code Playgroud)

git push 似乎不起作用

iam@heeere:/e/basic-computing-notes$ git push
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
Run Code Online (Sandbox Code Playgroud)

配置

我的 git 配置是

iam@heeere:/e/basic-computing-notes$ git config -l
user.email=algebrat@uw.edu
user.name=Brady Trainor
push.default=simple
alias.ac=!git add --all && …
Run Code Online (Sandbox Code Playgroud)

git ssh github

4
推荐指数
1
解决办法
2539
查看次数

标签 统计

git ×3

github ×2

ssh ×2

public-key ×1

ssh-keys ×1