Webstorm Git Install - Error Running Git - Cannot run program "/Applications/GitHub.app": error=13, Permission denied - webstorm

Newbie alert.
Just installed Webstorm, now trying to get Git configured properly.
I created an empty project in Webstorm and received the warning "Can't start Git" / Applications/GitHub.app Probably the path to Git is not valid"
When I set the path to GitHub in the Applications folder and try to test it, I get the error message "Cannot run program "/Applications/GitHub.app": error=13, Permission denied"
Any suggestion?
Thanks for any support.

in terminal, run 'sudo xcodebuild -license' and then agree to the terms.
reference:
https://intellij-support.jetbrains.com/entries/62745413-Mac-OSX-can-t-start-Git-after-updating-Mac-OS-XCode

Resolved. Sometimes when I'm taught to fish, it takes me a couple trys. So I performed the which git again after thinking about it for a while, and copied the location to the field and it works. So I was confused between the GitHug,app and the actual git executable. THANKS for the pointer to which git

Related

Problem building an AWS app with SAM and Maven

i am getting some errors while trying to build an AWS example "HelloWorld" app using SAM with Maven. Note that i've tried the same procedure using Gradle and everything works fine. I've followed this guide: https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-getting-started-hello-world.html.
The first terminal command "sam init" works fine as it should.
The problems starts with the second part where I typed "sam build", and that's where the following error happens.
Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved: org.apache.maven.plugins:maven-clean-plugin:jar:2.5 was not found in http://www.mycompany.com/maven-repository-manager during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of mrm-maven-plugin has elapsed or updates are forced -> [Help 1]
Despite with this error, the command created the folders for the project but when i open it using IntelliJ, it says that it couldn't find all the dependencies that are in the pom.xml file. I've also tried to delete the .aws folder like someone on the internet suggested but it doesn't worked. Note that i'm using Windows 11

Cannot chmod file on Openshift online v3 : Operation not permitted

I am migrating a Django application from Openshift v2 to v3 (In case you don't know, RedHat is shutting down v2 on September 30th, see: https://blog.openshift.com/migrate-to-v3-v2-eol/)
So, I am following this blog post to help me: https://blog.openshift.com/migrating-django-applications-openshift-3/ . I am new to all these Docker / Kubernetes concepts the new version is build upon.
I was able to make some progress : I managed to get a successful build of my app. Yet it crashes at deployment time:
---> Running application from script (app.sh) ...
/usr/libexec/s2i/run: line 42: /opt/app-root/src/app.sh: Permission denied
Indeed, app.sh has lost its x permission. I log into the failing container as debug and see it:
> oc debug dc/<my app>
> (app-root)sh-4.2$ ls -l /opt/app-root/src/app.sh
-rw-rw-r--. 1 default root 127 Sep 6 21:20 /opt/app-root/src/app.sh
The blog posts states "Ensure that the app.sh file is executable by running chmod +x app.sh.", which I did on my local repo. Whatever, I want to do it again directly in the pod, but it doesn't work:
(app-root)sh-4.2$ chmod +x /opt/app-root/src/app.sh
chmod: changing permissions of ‘/opt/app-root/src/app.sh’: Operation not permitted
So, how can I set the x permission to app.sh ? Thank you
Without looking into more details, any S2I builder image will gladly use your custom supplied run script to start the application in an alternative way.
Create .s2i/bin/ (mind the dot) in your source code directory, place the run script into it and rebuild the app in OpenShift - it will automatically use your custom run script upon deployment.
This is the preferred way of starting applications using custom commands in OpenShift.
Regarding your immediate problem, there is a very simple reason why you can not change the permissions of the script: you were trying to modify the permissions in the deployed pod, and not the builder pod. Deployed pods run using different UIDs, usually somewhere in the range of 100000000, and definitely do not match the file ownership as generated by the build. Hence permission denied.
The root cause of your problem (app.sh losing executable permissions) must be in the way the build process installs those files, and indeed looking at the /usr/libexec/s2i/assemble script in the base image does seem to reveal the culprit. The last two lines are:
# set permissions for any installed artifacts
fix-permissions /opt/app-root
If you wanted to change this part of the build instead of using a custom run script, I suggest you then create .s2i/bin/assemble in your project's source code and make it look sort of like this:
#!/bin/bash
echo "Running stock build:"
${STI_SCRIPTS_PATH}/assemble
echo "Fixing the mess:"
chmod 755 /opt/app-root/src/app.sh
This will fix whatever the stock build process does to file permissions, and will do it using the same UID as the rest of the build, so file ownership shouldn't be an issue.
as I stumbled upon this issue myself I've found a way to resolve it.
You have to make your file app.sh executable and push it in your repo as such.
If git does not track this modification as it did for me, you have to use: git update-index --chmod=+x app.sh for it to work.

Neo4j on Heroku with Python

I'm trying to get the Neo4j on Heroku and Getting Started with Python on Heroku tutorials up and going. The Neo4j one works fine, but the Python one has problems.
For anyone else trying to follow this tutorial, I've recorded the
problems and my solutions to help you out as well.
This is all done on a Win7 x64 dev machine.
Q1) "virtualenv venv --distribute" - errors with:
'virtualenv' is not recognized as an internal or external command, operable program or batch file.
A1) The workaround is to fully qualify the path to:
"C:\Python27\Scripts\virtualenv venv --distribute"
Q2a) "foreman start" - errors with:
'foreman' is not recognized as an internal or external command, operable program or batch file.
A2) Looks like a path issue so I ran the line:
"set PATH=%PATH%;C:\Program Files (x86)\Heroku\ruby-1.9.2\bin\"
Q2b) "foreman start" now errors:
Bad file descriptor
{Ruby paths...}
A2b) Help?
So I can't run the app locally, but maybe still on the server, so moving on...
Q3) .gitignore - can't create this file on Windows.
A3) Clone another project and copy that file and edit.
Q4) "git push heroku master" - errors with:
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
A4) Apparently need to create new SSH keys. Managing Your SSH Keys Note again fully quality the path such as below and select the new key to add to heroku.
"c:\Program Files (x86)\Git\bin\ssh-keygen.exe" -t rsa"
Q5) Try "git push heroku master" the same with the Neo4j test app "flask-py2neo" - errors during the compile. Is this example current?
A5) Remove distribute from requirements.txt.
Any ideas?

Redmine custom logo not appearing

I have installed Redmine and I've been playing around with a few themes. I am having trouble installing a custom logo. I add the new file in the correct folder and reference it in the correct stylesheet but when I inspect it in the browser it says "Failed to load the given URL"
I also tried making changes to the base.html.erb file and this did not show up either.
Simple changes to the stylesheet do work however.
Thanks for your help :)
Man, doing anything with Redmine customization is not easy but I finally got it. I followed this tutorial, http://www.redmine.org/projects/redmine/wiki/Howto_add_a_logo_to_your_Redmine_banner
However this did not actually work on my system so I added a few commands of my own. If these commands do not work then try adding sudo in front of them. THis will prompt you for the admin password.
Near the end, the tut tells you to do this in command line:
chown redmine:redmine /opt/redmine/public/images/logo.png
Now I am using Apache so my path would look more like this
chown apache:apache /var/www/redmine/public/images/logo.png
Anyway I tried that and it still had no effect, now the additions I was doing was either under public/images or public/themes so I chose to just target the public folder. This may be bad practice when going live but I am only working locally on a virtual machine.
Here is what worked:
chown -R apache:apache /var/www/redmine/public
chmod -R 775 apache:apache /var/www/redmine/public
The -R stands for recursive so it effects the child files too. chmod 775 allows read, write, execute permission for Owner & Group, and only read, execute permissions for Other.
Restart your server after that (the command could be slightly different depending on your setup, refer to the tut)
/etc/init.d/httpd restart
This was very confusing for me at first so let me know if anyone needs more clarification on the subject. I am using Redmine installed on a CentOS virtual box.

How to make Cygwin the default shell for Jenkins?

I'm trying to come up with some sensible solution for a build written using SCons, which relies on quite a lot of applications to be accessible in a Unix-like way, using Unix-like paths etc. However, when I'm trying to use SCons plugin, or Git plugin in Jenkins, it tries to invoke the plugins using something like cmd /c git.exe - and this will certainly fail, because Git was installed using Cygwin and is only known in Cygwin shell, but not in CMD. But even if I could make git and the rest available to cmd.exe, other problems arise: the Cygwin version of Git expects paths to have forward slashes and treats backward slashes as escape characters. Idiotic Windows file-system related issues kick in too (I can't give Jenkins permissions to delete my own files!).
So, is there a way to somehow make Jenkins only use Cygwin shell, and never cmd.exe? Or should I be prepared to run some Linux in a VM to have this handled?
You could configure Jenkins to execute the cygwin command with the specific shell command, as follows:
c:\cygwin\bin\mintty --hold always --exec /cygdrive/c/path/to/bash/script.sh
Where script.sh will execute all the commands needed for the Jenkins execution.
Just for the record here's what I ended up doing:
Added a user SYSTEM to Cygwin, mkpasswd -u SYSTEM
Edited /etc/passwd by adding the newly created user's home directory to the record. Now it looks something like the below:
SYSTEM:*:18:544:,S-1-5-18:/home/SYSTEM:
Copied my own user's configuration settings such as .netrc, .ssh and so on into the SYSTEM home. Then, from Windows Explorer, through an array of popups I've claimed ownership of all of these files to SYSTEM user. One by one! I love Microsoft!
In Jenkins I now run a wrapper for my build that sets some other environment variables etc. by calling c:\cygwin\bin\bash --login -i /path/to/script/script
Gave it up because of other difficulties in configuration and made Jenkins service run under my user rather then SYSTEM. Here's a blog post on how to do it: http://antagonisticpleiotropy.blogspot.co.il/2012/08/running-jenkins-in-windows-with-regular.html but, basically, you need to open Windows services, then find Jenkins service, select it's properties, go to "Logon" tab and change the user to the "this user".
One way to do this is to start your "execute shell" build steps with
#!c:\cygwin\bin\bash --login
The trick is of course that it resets your current directory so you need to
cd `cygpath $WORKSPACE`
to get back to the workspace.
Adding to thon56's good answer: this is helpful: "set -ex"
#!c:\cygwin\bin\bash --login
cd `cygpath $WORKSPACE`
set -ex
Details:
-e to exit on error. This is important if you want your jobs to fail on error.
-x to echo command to the screen, if desired.
You can also use #!c:\cygwin\bin\bash --login -ex, but that echos a lot of login steps that you most likely don't care to see.