git - 能够通过 SSH 连接到远程服务器,但无法 git push 生产
问题描述
我正在按照本指南第 12 步了解如何在远程服务器上设置推送到生产。
当我尝试 git push production master 时出现访问被拒绝错误。
user@example.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
但是,我可以通过 ssh root@example.com 登录。
我在 Windows 上使用 Putty 和 Laragon。
解决方案
这个问题的解决方案是通过删除当前的生产遥控器并专门使用 root 用户重新添加它来完成的。
推荐阅读
- amazon-web-services - 如何触发 EKS pod 的自动缩放?
- anaconda - 删除 ~/.conda/pkgs 是否安全
- c++ - Hand written move
- android - Android SearchView OnQueryTextListener 不工作
- c# - 在项目构建时将 SQLite 数据库文件从类库添加到 ASP.NET Core MVC 输出目录
- javascript - 如何获取一个数组的项目,在选择中使用 svelte 选择?
- mysql - docker 存储 mysql 设置的位置
- javascript - 我在此登录脚本中收到无法读取属性值错误:有什么想法吗?这是文本格式的整个 html:
- sass - 修复已弃用的 Sass 颜色数学运算
- javascript - Websocket本地ip和公共ip