git - 通过 windows cmd/powershell 去工作,但只有 git bash

标签 git go github cmd go-get

我已经设置了 git 并在我的 Windows 系统中安装了它。我有带密码的 ssh key 。当我进入 git bash 它会询问我的密码并正确获取,但是当我在 中执行此操作时命令 外壳 它抛出一个错误。

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 只是一个例子。它发生在所有 repo 中。

最佳答案

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

start-ssh-agent

关于git - 通过 windows cmd/powershell 去工作,但只有 git bash,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62223686/

相关文章:

git - Angular 2 和 .net core 2.0 - Azure 上自动部署的问题

git - 有没有类似svn revert的git revert?我需要一个命令来删除我本地的 *everything* 并将其设置为 remote head

git - 将旧分支 merge 到 develop 时非常奇怪的 git 行为

Git 不会比较我的主要插件文件吗?

git - “go get”不适用于我自己的 git 存储库

go - grpc:使用 oneof 会导致无效的内存地址或 nil 指针取消引用

git pull 遇到 kex_exchange_identification : Connection closed by remote host

go - 停止使用上下文执行简单功能

Git 推送被拒绝并且获取失败

Git push 不会忽略 .gitignore 中的文件