![git pull 返回“不是 git 存储库”错误](https://linux22.com/image/1367439/git%20pull%20%E8%BF%94%E5%9B%9E%E2%80%9C%E4%B8%8D%E6%98%AF%20git%20%E5%AD%98%E5%82%A8%E5%BA%93%E2%80%9D%E9%94%99%E8%AF%AF.png)
我正在尝试从远程存储库提取代码。当我运行“git pull”时,我收到以下消息:
$ git pull
[email protected]'s password:
fatal: 'var/www/html' 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.
这是我的配置设置:
$ git config -l
core.symlinks=false
core.autocrlf=true
color.diff=auto
color.status=auto
color.branch=auto
color.interactive=true
pack.packsizelimit=2g
help.format=html
http.sslcainfo=/bin/curl-ca-bundle.crt
sendemail.smtpserver=/bin/msmtp.exe
diff.astextplain.textconv=astextplain
rebase.autosquash=true
merge.tool=tortoisemerge
gui.recentrepo=C:/Users/Chris/Dev/Projects/html
core.repositoryformatversion=0
core.filemode=false
core.bare=false
core.logallrefupdates=true
core.symlinks=false
core.ignorecase=true
core.hidedotfiles=dotGitOnly
[email protected]:var/www/html
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.master.remote=origin
branch.master.merge=refs/heads/master
user.name=Chris Barnhill
user.email=*@gmail.com
gui.wmstate=normal
gui.geometry=887x427+26+26 171 192
顺便说一句,“gui.recentrepo”是错误的。我的本地仓库位于/Users/Chris/Dev/Projects/Hyperspace/html'
答案1
您确定远程仓库的位置吗?应该是 /var/www/html 吗?
看起来您正在访问相对路径。