Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
git 存储库托管在挂载到 Linux Ubuntu 的共享驱动器上。共享驱动器的 IP 地址已更改,环境变量(主机)已相应更新。但是,当推送到 shard 驱动器时,我得到“似乎不是 git 存储库”错误。这有什么原因以及如何解决它?谢谢,
我感觉您的本地 git repo 使用硬编码的 IP 而不是环境变量。跑git remote -v看看是不是这样。如果是,则运行git remote set-url <URL>将其更改为环境变量。
git remote -v
git remote set-url <URL>