git - 通过 windows cmd/powershell 去工作,但只有 git bash
问题描述
我已经设置了 git 并在我的 Windows 系统中安装了它。我有带密码的ssh 密钥。当我进入git bash时,它会询问我的密码并正确获取,但是当我在cmd或powershell中执行此操作时,它会引发错误。
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 只是一个例子。它发生在所有回购中。
解决方案
ssh 已配置,但我们需要先启动 ssh 代理,然后在终端/powershell 中键入任何 go 命令
start-ssh-agent
推荐阅读
- python - 根据来自另一个数据框的间隔将列添加到数据框
- java - 在 Toast 中获取 ratingbar 值
- tableau-api - 将客户要求的色板与 Tableau 中的销售人员匹配
- d3.js - 在 D3.js v4 中用轴转换包装长标签
- python - Numpy:将 2D 数组附加到 3D 数组
- kubernetes - 我在哪里可以找到有关 kubernetes ID 规范的信息,即 pod 后缀 ID 长度或 replicaSet 后缀 ID 长度?
- angular - Angular ngFor 和 CSS Grid - 如何检测第一列?
- reactjs - 使用 redux 和 react hooks 时首选哪种生命周期方法?
- reactjs - 用功能组件替换类组件中的构造函数
- azure - 存储名称已存在