0

我一直在尝试设置一台登台机器来在家中运行项目(rails 应用程序)。

# Remote machine connection
REPLOGIN=joel
REPADDRESS=192.168.2.100
REPLOCATION=/Users/joel/Projects/bio_watts #Repo location
REPNAME=biowatts

# Copy the repo to the server
echo "Copying the git repo to the server $REPADDRESS"
echo "repname:$REPNAME"
TEMPREP="$REPNAME.git"
echo "$TEMPREP"
git clone --bare .git $TEMPREP
scp -r $TEMPREP $REPLOGIN@$REPADDRESS:$REPLOCATION/

# Set up the origin for the project
#echo "Linking current repository to remote repository"
git remote add imac $REPLOGIN@$REPADDRESS:$REPLOCATION/$REPNAME.git/

这一切都很好

$git remote
imac   <== this is my remote machine

当我尝试 git push 到这台机器时,我得到:

Permission denied (publickey,keyboard-interactive).
fatal: The remote end hung up unexpectedly

我知道关于 SSH 的一些东西......但我不明白我需要在本地和远程机器(Mac OS X Lion)上做什么。

有人可以帮忙吗?

干杯,

乔尔

下一个问题:

在我的远程机器上,我确实找到了克隆的 biowatts.git 文件……但我没有看到项目文件(rails 应用程序)……它是如何工作的?

我的意图是 git push 到我的 imac 并在那里运行我的应用程序(瘦启动)???

我需要手动复制我的文件吗?我假设 git clone 会复制我需要的每一个......

4

3 回答 3

1

那台远程机器需要知道你的 ssh 密钥。

您需要在本地生成一个密钥(如果您没有),然后将公钥添加到远程服务器的~/.ssh/authorized_keys

您可以按照关于设置密钥的 GitHub 教程进行操作(如果您还没有设置它们)。

http://help.github.com/mac-set-up-git/

而不是第 4 步。将您的 SSH 密钥添加到 GitHub,您需要将您的密钥添加到服务器上的 authorized_keys 文件中。

于 2012-01-05T15:47:46.783 回答
1

您的远程 git 服务器应该通过 iMac 的公共 ssh 密钥了解您的机器,并且应该在某处配置允许您推送(写入权限)。

于 2012-01-05T15:48:47.370 回答
0

将来,对于那些在 assembla 中特别遇到这种情况的人,解决方案是将您的 ~/.ssh/id_rsa.pub 复制到 assembla 配置文件中。这篇文章提供了分步说明。

于 2012-04-18T16:04:28.530 回答