zoukankan      html  css  js  c++  java
  • windows 部署 git 服务器报 Please make sure you have the correct access rights and the repository exists.错误

      这两天在阿里云上弄windows 服务器,顺便部署了一个git服务。根据网上教程一步步操作下来,最后在 remote远程仓库的时候提示

    fatal: 'yourpath/test.git' does not appear to be a git repository
    fatal: Could not read from remote repository.

    Please make sure you have the correct access rights
    and the repository exists.

      一直提示仓库不存在。

      经过两天的各种查找文章,都没有解决问题,最后想会不会是权限的问题,查看服务器仓库文件夹看到已经有管理员和system的账户权限,bitvise也是用管理员运行的。那会不会是git登陆时候用的不是管理员用户呢?查找用户组发现有一个 Bitvise SSH Server Virtual Users 账户。于是把这个账户添加到仓库文件夹,并给读写权限。再次同步仓库,没有报错了。

      那么原因很明显了,git客户端登陆时用的是 Bitvise SSH Server Virtual Users 账户,所以服务器的git仓库需要给予权限。这在很多文章中都没看到这一点说明。

      ////更新

      后来在上传文件时,git还是提示没有权限。经检查发现是根目录也应该赋予同样的账户权限。此时发现用户目录下有一个BvSsh_VirtualUsers文件夹,经测试,可以把git仓库放在这个目录下,因为这个目录已经给了 Bitvise SSH Server Virtual Users 账户权限。

      git的部署工具用了以下两个软件

    • Bitvise SSH Server
    • Git for Windows

      文章可以参考:

        廖雪峰的教程:http://www.liaoxuefeng.com/wiki/0013739516305929606dd18361248578c67b8067c8c017b000

            这应该是比较详细的git教程。git的命令也是通用的,不分linux/windows.

        windows的部署可以参考这个文章:

             http://blog.michiru.me/posts/git-server-on-windows.html

         简单明了,唯一需要注意的是我上面的给仓库权限。

  • 相关阅读:
    脑洞大开的爬虫解决思路 转载:https://mp.weixin.qq.com/s/Bd-wz_RiRpYv8ufIbQTZDg
    js逆向某东滑块 转载 https://mp.weixin.qq.com/s/eZSTfduYS63-LOvkAofxqA
    不能爬小程序,叫什么会爬虫 【参考资料也要看】 https://mp.weixin.qq.com/s/oDG3k_qjMZaoygZmz9OUDw
    HDU6042 Journey with Knapsack
    HDU7073 Integers Have Friends 2.0
    CF1439C Greedy Shopping
    CF813E Army Creation
    POJ1322 Chocolate
    CF451E Devu and Flowers
    POJ3734 Blocks
  • 原文地址:https://www.cnblogs.com/jidanfan/p/5768685.html
Copyright © 2011-2022 走看看