【发布时间】:2012-02-16 15:39:33
【问题描述】:
我在/home/dan/repo/ 有一个裸存储库,在/home/dan/www/project/ 有一个工作副本。
我想让工作副本在每次提交到repo 时自动将其当前分支从repo 拉出。
我在/home/dan/repo/hooks/post-update创建了一个文件:
#!/bin/sh
cd /home/dan/www/project || exit
unset GIT_DIR
git pull
exec git-update-server-info
工作副本的origin 设置为repo:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = dan@server:/home/dan/repo/
然而,每次提交时我都会收到一个错误:
remote: Permission denied, please try again.
remote: Permission denied, please try again.
remote: Permission denied (publickey,password).
remote: fatal: The remote end hung up unexpectedly
我该如何解决这个问题?
【问题讨论】: