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

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

  • 相关阅读:
    python 代码编写环境及编辑器配置
    升级gradle:Could not find method jackOptions() for arguments
    Unable to determine application id: com.android.tools.idea.run.ApkProvisionException: No outputs for the main artifact of variant: debug
    ecplice 如何智能提示(旧)
    seo 回忆录百度基本概念(一)
    正则表达针对html(九)
    读Pyqt4教程,带你入门Pyqt4 _002
    [Objective-c] 002_对象 类 变量 方法
    SD.Team字符表情集大全(持续更新中..)
    SD.Team主题形象小人偶
  • 原文地址:https://www.cnblogs.com/jidanfan/p/5768685.html
Copyright © 2011-2022 走看看