If have installed the Git Bash and Heroku CLI separately.I am using a 32-bit windows operating system.When I am typing " heroku login" command in cmd I am getting the login option but in Git Bash its showing Heroku command not found.
# MINGW32:/
HOME#HOME-PC MINGW32 /
$ heroku login
bash: heroku: command not found
I am not able to reproduce this issue, but it seems pretty common and known.
According to this is issue on Github heroku-cli project,
I closed out Git Bash then opened the command prompt. From there, I
was able to successfully login to heroku through "heroku login". I
then closed the command prompt and re-launched Git Bash and everything
worked fine.
This workaround worked for a few people, however the issue is still open.
Related
I have a shell script Sync.sh on a CentOS7 server that executes a git checkout and then a git pull. Each of these commands uses the -C <path> option so the script can live wherever it wants. This all works fine when logged in via SSH (PuTTY) and running the script from the command line ./Sync.sh
However, when I run this via a PHP script, it fails:
$CommandOutput = shell_exec( "./Sync.sh" );
I added a git --version to Sync.sh and found that the PHP is using git version 1.8.3, which does not include the -C <path> option (it was added in 1.8.5 if I remember right). However SSH's git --version returns 2.9.5, which explains why running Sync.sh fails via PHP but works fine when run via SSH.
So the questions are:
why is PHP getting a different git version than SSH?
how can I make PHP get the same version as SSH?
I am getting following error when i git clone using php shell_exec() on windows server. My git version is git version 2.11.1.windows.1.
Host key verification failed.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists
But working fine through git bash and command prompt. I have configure ssh properly.
The problem is the file which i have created is in the c:/inetpub/example.com/deploy.php
I am running following code in php file.
shell_exec('cd c:/inetpub/ && "c:/Program Files/Git/bin/git" clone sshURL 2>&1')
Can any one suggest any solution to fix this issue.
I try to setup a local website to resign ipa file. but I have an issue with codesign command.
the command works properly when I run it from the shell terminal.
But it shows this error when it run from php: "no identity found".
I run an Apache server with php.
I think the account used to run apache server haven't access to keychain library.
Any idea how to fix this issue?
I finaly found a solution,
my command was :
codesign -f --verbose -s D7F14A3C73E20026ECB384BB7F7FCAEB76EF24B3 --resource-rules Payload/my.app/ResourceRules.plist Payload/my.app
I went to Keychain Acces, and copy my certificate from Session to System.
and it works
I'm trying to install Laravel Homestead in order to be able to test my Laravel projects locally.
I'm following this tutorial: http://laravel.com/docs/4.2/homestead
In the "Installing Homestead" part I followed the second step "Manually Via Git (No Local PHP)",I don't have any PHP installed locally and can't use Composer. (Wasn't PHP supposed to be installed as part of Homestead?)
I got to this part:
Once you have installed the Homestead CLI tool, run the bash init.sh command to create the Homestead.yaml configuration file:
bash init.sh
In command prompt I tried to enter the following command:
bash init.sh
I got the following error:
'bash' is not recognized as an internal or external command, operable program or batch file.
Then I tried to enter the same command in Git Bash, and I got the following error:
bash: init.sh: No such file or directory
When I tried to enter in Git Bash simply
init.sh
I got the following error:
sh.exe": init.sh: command not found
I ran into this problem well. You need to hop into your terminal (I am on Mac.)
Type into your console: cd ~/Homestead
and to make sure you are in your newly generated Homestead folder (you can always click Finder > your home directory > Homestead to confirm it's where it should be),
then while in terminal simply type ls -- if it lists all of the files like Vagrantfile, composer.lock and bash init.sh, you should be in.
Once you know you are in the correct Homestead folder, it is now at that point in which you run bash init.sh
After doing this it now says Homestead initialized!
.sh is a unix/linux script executable, that isn't recognized on Windows. There's a init.bat included in the package, but it isn't referenced in the tutorial.
Just run init.bat from the command line. It will copy the files to:
%HOMEDRIVE%%HOMEPATH%\.homestead
You need install Git Bash, and then run commands into Git Bash.
Try init.bat that worked for me
If the init.bat refused to work
Go to the Homestead folder.
C:/Users/Computer Name/Homestead
You will see init.bat: double click to run it.
Problem solved.
I found the answer you may be looking for. I was having the same problems with this. Just make sure at the end of bash init.sh you put a ;
So in the git bash cmd you will have this line
$ bash init.sh;
Just do it using sudo.
$sudo bash init.sh
I'm getting an error saying:
failed to clone https://github.com/php-fig/log.git, git was not found, check that it is installed and in your PATH env.
'git' is not recognized as and internal or external command, operable program or batch file
when I try and run composer create-project laravel/laravel learning-laravel.
I installed the git GUI which also comes with a command line shell, but I don't know why its not recognising the command (I'm issuing the create-project command in the normal windows command line prompt).
I also tried running the command from the git shell, which worked, but when I tried php artisan serve it gave me an error saying CLI has stopped working.
Does anyone know how to fix the git error? I'd rather use the windows command shell instead of the git one as it can then go into my wamp/www file
You need to add the directory you installed git to to your PATH environment variable.
Right click on Computer.
Click Advanced System Settings
Click Environment Variables inside the Advanced Menu
Under System Variables, scroll to PATH
Add ;"C:\path\to\git\bin";"C:\path\to\git\cmd"
Test the git command in the command prompt to see if it worked. Git is usually located in Program Files or Program Files(x86).
There is an easier (but temporal) way to add a path variable in Windows.
Paste this in your command prompt:
SET PATH=%PATH%;C:\Program Files\Git\bin
This will work for the rest of the command prompt session. Don't forget installing Git before this.
You'll need to add git to your system PATH if you want to use it in regular command prompt.
Here's a guide on modifying your system path in Windows:
http://www.computerhope.com/issues/ch000549.htm
you need to uninstall git and reinstall ( or update ) in the options you need to change from git bash only to allow git to be added to command line as well, also since it then adds it to your path you may or may not need to restart your computer
I was having some issues using git on Windows. I found this information only and it worked for me.
http://ccn.ucla.edu/wiki/index.php/Setting_Up_and_Using_Git#Windows