当我尝试使用下一个命令从本地存储库推送到远程 Windows 机器时:
git push ssh://username@ip_address:/C/Users/username/project.git master
输入凭据后出现此错误:
fatal: ''/c/Users/username/project.git'' does not appear to be a git repository
fatal: Could not read from remote repository.
似乎 /C/Users/username/project.git
必须替换为 C:/Users/username/project.git
(前面没有“/” C) 但是当我尝试这个变体时,在请求凭据之前我得到了另一个错误:
ssh: Could not resolve hostname ip_address:C:: Name or service not known
最佳答案
SSH URL 中的任何“:”都会使 SSH 将其解释为 SCP syntax
一个实际的 URI 被注释为 ssh://username@ip_address/C/Users/username/project.git
确保检查此处使用的路径的大小写(小写/大写)。
也可以尝试使用 /c/...
与 /C/...
https://stackoverflow.com/questions/61326216/
相关文章:
wordpress - 全局禁用 WP Gutenberg 预发布检查
amazon-web-services - 注册到 AWS Chime session 通知
uwp - 如何支持使用 Windows Cloud Sync Engine API 进行删除?
ruby-on-rails - 指定环境时 Webpacker 不替换 "process.env"变
c# - Blazor + MongoDb 身份 : Value cannot be null.(参
spring-boot - 使用 Spring jpa 查询在字符串列表的列中搜索字符串