简体   繁体   English

git remote push:权限被拒绝(publickey,键盘交互)

[英]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.

相关问题 Heroku:权限被拒绝(公钥)。 致命的:执行git push时无法从远程存储库读取 - Heroku: Permission denied (publickey). fatal: Could not read from remote repository when doing git push git@github.com:权限被拒绝(公钥)。 致命:无法从远程存储库读取。 在云上 9 - git@github.com: Permission denied (publickey). fatal: Could not read from remote repository. on cloud 9 权限被拒绝(公钥)。 严重的:无法从远程存储库读取 - Permission denied (publickey). fatal: Could not read from remote repository Capistrano 在 git:check 上部署失败 - 权限被拒绝(公钥) - Capistrano Deploy Failing on git:check - Permission denied (publickey) 亚马逊EC2 + Capistrano + Git:权限被拒绝(publickey) - Amazon EC2 + Capistrano + Git: Permission denied (publickey) git clone通过ssh返回权限被拒绝(公钥,密码) - git clone through ssh returns Permission denied (publickey,password) Capistrano bitbucket - 权限被拒绝(publickey) - Capistrano bitbucket - Permission denied (publickey) git push heroku master权限被拒绝 - git push heroku master permission denied heroku - rails - 权限被拒绝(publickey) - heroku - rails - Permission denied (publickey) Capistrano使用错误的用户来获取远程回购。 权限被拒绝(公钥) - Capistrano uses the wrong user to fetch remote repo. Permission denied (publickey)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM