[英]git remote push : Permission denied (publickey,keyboard-interactive)
I have been trying to set up a staging machine to run project at home (rails application). 我一直在尝试设置一个临时机器来在家里运行项目(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/
All this worked fine 这一切都很好
$git remote
imac <== this is my remote machine
When I try to git push to this machine I get: 当我尝试git推送到这台机器时,我得到:
Permission denied (publickey,keyboard-interactive).
fatal: The remote end hung up unexpectedly
I know there is something about SSH ... but I don't understand what I need to do on my local and on my remote machines (Mac OS X Lion). 我知道有一些关于SSH的东西...但我不明白我需要在本地和远程机器上做什么(Mac OS X Lion)。
Can someone help? 有人可以帮忙吗?
Cheers, 干杯,
Joel 乔尔
NEXT QUESTION: 下一个问题:
On my remote machine I do find my cloned biowatts.git file ... but I don't see the project files (rails app) ... how does it work? 在我的远程计算机上,我找到了我的克隆biowatts.git文件...但我没有看到项目文件(rails app)......它是如何工作的?
My intent is to git push to my imac and run my app there (thin start) ??? 我的意图是git推送到我的imac并在那里运行我的应用程序(瘦启动)???
Do I need to copy my file manually? 我需要手动复制我的文件吗? I assumed that the git clone would copy every I needed ...
我假设git clone会复制我需要的每一个......
That remote machine needs to know about your ssh keys. 该远程机器需要知道您的ssh密钥。
You need to generate a key locally (if you don't have one) and then add the public key to the remote server's ~/.ssh/authorized_keys
你需要在本地生成一个密钥(如果你没有),然后将公钥添加到远程服务器的
~/.ssh/authorized_keys
You can follow the GitHub tutorial on setting up keys (if you don't already have them set up). 您可以按照GitHub教程设置密钥(如果您尚未设置密钥)。
http://help.github.com/mac-set-up-git/ http://help.github.com/mac-set-up-git/
Instead of Step 4. Add your SSH key to GitHub, you'll need to add your key to the authorized_keys file on the server. 而不是步骤4.将SSH密钥添加到GitHub,您需要将密钥添加到服务器上的authorized_keys文件。
你的远程git服务器应该通过你的iMac的公共ssh密钥知道你的机器,并且应该有一个允许你推送(写权限)的配置。
In the future, for those of you encountering this in assembla specifically, the solution is to copy your ~/.ssh/id_rsa.pub to the assembla profile. 在将来,对于那些在具体的组件中遇到此问题的人来说,解决方案是将〜/ .ssh / id_rsa.pub复制到assembla配置文件中。 This post gives step by step instructions.
这篇文章给出了一步一步的说明。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.