首页 > 解决方案 > 通过 windows cmd/powershell 去工作,但只有 git bash

问题描述

我已经设置了 git 并在我的 Windows 系统中安装了它。我有带密码的ssh 密钥。当我进入git bash时,它会询问我的密码并正确获取,但是当我在cmdpowershell中执行此操作时,它会引发错误。

Cloning into 'go\src\github.com\aws\aws-sdk-go'...
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

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

(甚至不问密码)这个 repo 只是一个例子。它发生在所有回购中。

标签: gitgogithubcmdgo-get

解决方案


ssh 已配置,但我们需要先启动 ssh 代理,然后在终端/powershell 中键入任何 go 命令

start-ssh-agent

推荐阅读