我正在尝试在我的经销商托管帐户(inmotion托管)中设置githook。我为git设置了git init --bare
和配置post-receive
文件的文件夹,并在git中添加了远程ssh。当我运行git remote -v
origin https://github.com/{username}/{projectname}.git (fetch)
origin https://github.com/{username}/{projectname}.git (push)
production ssh://{hostingusername}@{domain-name}:{port}/repo/site.git (fetch)
production ssh://{hostingusername}@{domain-name}:{port}/repo/site.git (push)
我收到错误
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
尝试跑步时
git push production master
答案 0 :(得分:1)
如果您使用的是共享主机,请检查您的目录路径。我对此表示怀疑。我也有同样的麻烦。