laravel “ssh”未被识别为内部或外部命令
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/24158177/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
'ssh' is not recognized as an internal or external command
提问by Daniel Chikaka
I have been trying to deploy my app into the Fortrabbit servers using the command line. I'm using windows. Here is what I tried :
我一直在尝试使用命令行将我的应用程序部署到 Fortrabbit 服务器中。我正在使用窗户。这是我尝试过的:
C:\projects\riwaya>git remote add fort [email protected]:riwaya.git
C:\projects\riwaya>git remote fort
C:\projects\riwaya>ssh [email protected]
'ssh' is not recognized as an internal or external command, operable program or batch file.
I have watched This Laracast Videoand did the same as Jeffrey but it doesn't work ...
我看过这个 Laracast 视频并且和杰弗里一样,但它不起作用......
Can somebody help ?
有人可以帮忙吗?
回答by edi9999
Actually you have 2 problems here: First is that you don't have ssh installed, second is that you don't know how to deploy
其实你这里有两个问题:第一是你没有安装ssh,第二是你不知道如何部署
Install SSH
安装 SSH
It seems that ssh is not installed on your computer.
您的计算机上似乎没有安装 ssh。
You can install openssh from here : http://openssh.en.softonic.com/download
您可以从这里安装 openssh:http: //openssh.en.softonic.com/download
Generate your key
生成您的密钥
Than you will have to geneate your ssh-key. There's a good tutorial about this here:
比您必须生成您的 ssh 密钥。这里有一个很好的教程:
https://help.github.com/articles/generating-ssh-keys#platform-windows
https://help.github.com/articles/generate-ssh-keys#platform-windows
Deploy
部署
To deploy, you just have to push your code over git. Something like this:
要部署,您只需将代码推送到 git 上。像这样的东西:
git push fort master
If you get permission denied, be sure that you have put your public_key in the dashboard in the git tab.
如果您的权限被拒绝,请确保您已将您的 public_key 放在仪表板的 git 选项卡中。
SSH
SSH
The ssh command gives you access to your remote node. You should have received a password by email and now that you have ssh installed, you should be asked for a password when trying to connect. just input that password. If you want to use your private ssh key to connect to your server rather then typing that password, you can follow this : http://fortrabbit.com/docs/how-to/ssh-sftp/enable-public-key-authentication
ssh 命令使您可以访问远程节点。您应该已经通过电子邮件收到密码,现在您已经安装了 ssh,尝试连接时应该会要求您输入密码。只需输入那个密码。如果您想使用您的私人 ssh 密钥连接到您的服务器而不是输入该密码,您可以按照以下步骤操作:http: //fortrabbit.com/docs/how-to/ssh-sftp/enable-public-key-authentication
回答by sivaprakash
Windows: install the git base. the link is given below
https://git-scm.com/downloads
set the environment variable using the below comments
Step1: Windows+R type sysdm.cpl
step2: Select advance ->Environment variable
step3: Select path-> edit the path and past the below lines.
C:\Program Files\Git\git-bash.exe
step4: Windows+R type cmd
stpe5: ssh