相关疑难解决方法(0)

IntelliJ IDEA GitHub集成创建了存储库,但尝试推送时出现"无法授权"错误

  1. 我在IntelliJ IDEA中创建了一个新项目

  2. 通过菜单,我转到VCS - >导入到版本控制 - >在GitHub上共享项目

  3. 输入新存储库名称,然后单击"共享"

  4. 它使用GitHub进行身份验证

  5. 当我尝试推送到GitHub时,会打开一个登录窗口,显示"登录到https://github.com/myemail@gmail.com/GitHubTest2.git "

  6. 默认登录名是github.com/my_username.我尝试使用该登录名登录并且我的GitHub.com密码和身份验证失败.我也尝试使用我的GitHub.com登录(即myemail@gmail.com)和我的GitHub.com密码登录.

  7. 3次尝试后,我收到以下错误消息:

推送到GitHub失败推送授权失败:无法授权

为什么它使用我的GitHub.com登录/密码与GitHub进行身份验证,但是当它试图将项目推送到GitHub时却没有?

git github intellij-idea

6
推荐指数
2
解决办法
8284
查看次数

使用代理后面的git

我在代理人后面.为了git工作,我将不得不添加

proxy = http://username:password@proxy.at.your.org:8080
Run Code Online (Sandbox Code Playgroud)

.gitconfig.

既然username并且password是我的系统凭证,这个解决方案很糟糕,因为我必须将它们存储为cleartext.

我正在使用Google Chrome我不需要设置任何代理设置的地方,因为它使用系统代理设置.

怎么做git

windows git configuration proxy

6
推荐指数
1
解决办法
5838
查看次数

如何长时间设置 git cache --timeout ?

这里Git推送需要用户名和密码我读到如何在命令行中运行git命令时向/从github推送/拉取时不输入登录名/密码。

我发现下一个:

git config --global credential.helper 'cache --timeout 7200'
Run Code Online (Sandbox Code Playgroud)

启用凭据缓存后,将缓存 7200 秒(2 小时)。

我认为 2 小时太小,并尝试使用命令设置大约 200 小时:

git config --global credential.helper 'cache --timeout 7200000'
Run Code Online (Sandbox Code Playgroud)

我的本地服务器和远程服务器上都有 Ubuntu 18。

但是当我第二天运行 github 时(我想已经过去了 10-12 个小时),它不起作用。

此缓存选项是否有一些时间限制或者有什么问题?

谢谢!

git github

6
推荐指数
1
解决办法
6698
查看次数

SSHing git@github.com显示错误/旧的SSH密钥

k,所以我正在设置Git并按照本教程设置SSH密钥.指纹是16:27:...:a6:48.我安装了WindowsGitHub客户端,github_rsa%user%/.ssh/文件夹中自动设置了一个新的SSH密钥.

我删除了"旧的"SSH密钥(不要问我为什么)并设置一个新的指纹a6:17:ed:4a:1d:9a:c7:63:6a:a1:38:8b:96:e3:91:bf我只是删除了以前的id_rsa密钥和known_hosts文件然后用来ssh-keygen制作另一个 - 我没有弄乱GitHub键).

现在,每当我试图进入时git@github,它说:

无法建立主机'github.com(207.97.227.239)'的身份验证RSA密钥指纹是16:27:...:a6:48您确定要继续连接(是/否)吗?

这不是我想要的.它显示了我删除的旧SSH密钥(以及known_hosts).我该怎么办?

[编辑]:我(错误地)假设来自终端输出的指纹与我的公共RSA密钥的指纹匹配.我仍然遇到SSH问题,但它与此无关(问题已被提出,请阅读:Git push需要用户名和密码).我会删除这个问题,但它不允许我说"它有一个或多个答案.请标记它以供主持人注意." _尽管它是我的.欲了解更多信息,访问:https://meta.stackexchange.com/questions/140646/what-should-i-do-if-i-realize-the-premise-of-a-question-was-faulty-but-i- alread/140676#140676

git ssh github ssh-keys

5
推荐指数
1
解决办法
6080
查看次数

在Dreamhost中从SSH执行'git pull'到没有密码的GitHub

我在使用git命令(例如git pull)时遇到困难,而不必使用GitHub输入用户名和密码.

我可以通过SSH连接到我的Dreamhost服务器并手动运行git pull.然后我必须输入我的GitHub用户名和密码.这是罚款和花花公子,但我想运行git pull WITHOUT不必输入我的GitHub的凭据每次.

发现我需要添加SSH密钥,但服务器仍然要求GitHub凭据.

我做了以下事情:

  1. 使用PuTTy SSH进入Dreamhost共享服务器

  2. 做了以下事情:

$ ssh-keygen -t rsa

Generating public/private rsa key pair.

Enter file in which to save the key (/home/funkyserver/.ssh/id_rsa):

Enter passphrase (empty for no passphrase):   <-- I left this empty

Enter same passphrase again:   <-- I left this empty

Your identification has been saved in /home/funkyserver/.ssh/id_rsa.

Your public key has been saved in /home/funkyserver/.ssh/id_rsa.pub.

The key fingerprint is:

12:c3:12d:88:01:pp:12:b5:ca:33:8g:1q:64:ce:4a:81 funkyserver@wonkyninja  <-- wonkyninja is Dreamhost's server name …
Run Code Online (Sandbox Code Playgroud)

git ssh github dreamhost ssh-keys

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

尽管我设置了SSH身份验证,为什么github会问我用户名/密码?

我已按照这些说明为github设置SSH密钥.但现在当我这样做

> git pull
Username for 'https://github.com': 
Run Code Online (Sandbox Code Playgroud)

在本地计算机上的存储库中,我已经从公共SSH密钥,我仍然被要求输入用户名/密码.我错过了一步吗?

git ssh github

4
推荐指数
2
解决办法
2113
查看次数

如何使用个人访问令牌进行 git commit?

我在 github 上制作了所有权限保留的个人访问令牌。

我看到了

git clone https://<username>:<personal_access_token>@github.com/<username>/<project_name>.git
Run Code Online (Sandbox Code Playgroud)

作品。

那么如何使用个人访问令牌克隆、提交和推送呢?

像这样

cd /tmp
git clone https://<username>:<personal_access_token>@github.com/<username>/<project_name>.git

cd /tmp/auto_tutorial
git commit --allow-empty -m 'Trigger notification'
git push https://<username>:<personal_access_token>@github.com/<username>/<project_name>.git master
Run Code Online (Sandbox Code Playgroud)

git

2
推荐指数
3
解决办法
6696
查看次数

Git 总是提示输入密码

我已按照以下指南在 Mac OS 10.7.4 上设置 SSH 密钥。

https://help.github.com/articles/generate-ssh-keys

但由于某种原因,它不断提示我输入密码。如果我不指定密码,它不会提示我,但这不是我想要的。有没有办法缓存我的密码,这样我就不会在每次拉/推时都收到提示?

git macos ssh github

0
推荐指数
1
解决办法
792
查看次数

标签 统计

git ×8

github ×6

ssh ×4

ssh-keys ×2

configuration ×1

dreamhost ×1

intellij-idea ×1

macos ×1

proxy ×1

windows ×1