I installed a git extension named git-ftp.
I want to use this extension everytime i make a pull from a remote repo to push the changes to a remote FTP Server where my private staging webspace is, so that i have the changes from others also over there.
When i make my pull from the command line in terminal, everything is fine, but when i use SourceTree to pull, the output says "git: 'ftp' is not a git command. See 'git --help'." Use of git-ftp is like "git ftp push" to push the changes to FTP.
The git version is changed via preferences to the same version i get if i type in "which git" on the command line. So why ST doesn know "git ftp" and how do i change that?
Now i found a solution that works. In the Script, i run the command directly with the path where is installed git-ftp. Now it looks like:
~/git-ftp/git-ftp push | tee "post-merge.log"
Where ~/git-ftp/ is the folder i cloned the repository to. With this in my hooks, i get also the correct output inside SourceTree's command line.
The Hook-Script i wrote gave me some Details. The User that excutes the Script, where the Script is executed and the exit code of the command 'git ftp push'. The User and the path of execution are in both ways the same.
The exit code of the command is 1 if ST trys to execute. The developer told me there is no exit code 1, so it has to be a problem in the way im using git-ftp.
For your information, here is the conversation i had with the dev of git-ftp. https://github.com/resmo/git-ftp/issues/159
Exit code 1 is very common exit code from the shell, for example not being able to find a command. To find out exactly what it means and what is failing, you really need to see the underlying steps and which one produces an error. Do you get that from git-ftp, or is there a way you can make it output more diagnostics (like a -v option)?
The Hook-Script contains following lines:
git ftp push -v >> "post-merge.log" rtrn=$? if [ $rtrn -ne 0 ]; then echo "git ftp push failed with exit code $rtrn" >> "post-merge.log" fi
The output inside the logfile says exit code 1. What ST gives me back was posted in my opening Post.
As i said, from command line everything runs fine. Is also tried a simple script that just runs 'git ftp push' and bind that via custom actions. But it also fails with the same message. "git: 'ftp' is not a git command. See 'git --help'."
Good morning, After a long weekend cleaning up, I am still in the cleanup mode 😊. I am curious to know: When do you feel the urgency to cleanup your Atlassian Tools? How many times do y...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG