Where is this file supposed to be? - macos

When I looked on my desktop I noticed the file "git-credential-osxkeychain" is on there.
I'm assuming it's a git file, but don't know how it managed to end up on my desktop. Where is it supposed to be?

I believe it's supposed to be in /usr/local/bin/git-credential-osxkeychain
Look at this post:
Trying to install git on OSX: cannont exec 'git-credential-osxkeychain': Permission denied`

Related

Permission denied when trying to run karaf 0.8.1

I downloaded the OpenDaylight Oxygen SR1 Zip file, unzipped the karaf-0.8.1 file, changed my directory to it but when I try to run ./bin/karaf I get:
./bin/karaf: Permission denied
When I try sudo ./bin/karaf I get
sudo: ./bin/karaf: command not found
The weirdest part is that I also have the folder of the previous version, i.e. karaf-0.7.1, in the same Downloads folder and these commands work perfectly fine in there. I would like to use the latest version however. Could anyone help me please?
Edit: Sorry, forgot to mention I'm running it on Mac OS X
On a Unix-like system, you’re better off downloading the tarball: extracting that will give you files with the correct permissions.
In your case, to fix your setup, you need to run
chmod 755 bin/{client,inc,instance,karaf,setenv,set_persistence.sh,shell,start,status,stop}
to restore the permissions as they ship in the tarball.

Git crash while using intelliJ: "git.exe - Bad Image"

So this just happened after using git on current machine for months. I copied a directory inside intelliJ and my git crashed.
git-gui gives git.exe - Bad Image, intellij gives git.exe - Bad Image, command line git commands don't respond.
Has anyone encountered this before? What could be the cause of it?
From the Comments:
Have you tried reinstall `git`? Sometimes it's as simple as that.
Response:
just reinstalled, that seems to have fixed it. It's still worrying that git core dll file can get corrupted for unknown reasons.
I'm answering this so other users with the same problem can easily determine the answer that was provided.
I faced the similar issue. It was solved after I reinstalled the git. I do not know the exact reason why the git file has already corrupted. But this solved the issue for me.
Please go to this link at https://git-for-windows.github.io/ to download git for windows.

warning: templates not found /usr/local/git/share/git-core/templates

I get this error warning: templates not found /usr/local/git/share/git-core/templates when I cloning repo in local repository this link, this link, and this link I tried this method and I just waiting more than 20 minutes but repo doesn't clone. I use source-tree and OS X El Capitan. How can I fix it?
Create a templates folder.
In your case, it should be: mkdir /usr/local/git/share/git-core/templates
I was also getting same error
warning: templates not found /usr/local/git/share/git-core/templates when I cloning repo in local repository then i found solution which solved my issue.
I Added the [init] section to .gitconfig in home directory, so that it looked at SourceTree's git templates directory when cloning a repo:
[init]
templatedir = /Applications/SourceTree.app/Contents/Resources/git_local/share/git-core/templates
Hope it will help you!.
In case of Source tree on macOS
Steps:
Source tree Menu
Preferences
Git
Click on System Git under Embedded Git Version 2.2.1
Reset to embedded Git
Restart source tree
Similar to Rohit's answer, I went into SourceTree's Tools->Options->Git and selected "Update Embedded Git". After the latest Embedded Git version was installed, the warning stopped occurring.
Cloning via SourceTree for Mac, the download was stuck at 99% and I was getting the same error:
warning: templates not found /usr/local/git/share/git-core/templates
I started looking up the issue and found this Question. Was about to start with some of the Answers here...
But then it finally completed. So, my Answer: wait a bit longer. Mine was cloning for 10 minutes or so.
#wonderfulthunk's comment works for me:
sudo mkdir -p /usr/local/git/share/git-core/templates && sudo chown -R my_username /usr/local/git
I followed below steps and I am able to get through this issue in Windows 10.
Step1:
First know the path of %USERPROFILE% using below command in command prompt.
echo %USERPROFILE%
Please note that, you can also run git config --list and look for init.templatedir for the path.
Step2:
Look for .git_template folder in it.
If is missing, please run below command to add it.
git config --global init.templatedir "%USERPROFILE%.git_template
Step3:
Create a folder namely templates in it.
After creating this templates folder, I did not get the warning mentioned i.e. 'templates not found' any more.
MacOS: Ventura 13.0 /
Sourcetree: 4.2.0
I fixed warning: templates not found /usr/local/git/share/git-core/templates by going to "Sourcetree preferences -> Git" and clicking to "Use System Git". There's no need to restart Sourcetree, just try to clone again.
I didn't switch to usage of embedded Git again, all works perfectly with usage of System Git.
In my case, this happened because an unaccesed project. Check that you have all the privileges to clone that repository.
If you use Sourcetree application, switch git version from "Embedded Git" to "System Git" in setting.
https://community.atlassian.com/t5/Bitbucket-questions/About-git-path-for-Sourcetree/qaq-p/186483
And after changing git version, if you still have problem with cloning, change protocol from "ssh" to "https".
I couldn't get past this problem. Even after getting rid of the 'templates not found' error by adding the usr/local/git... folder, the clone would still look like it was at 99% and sit there for HOURS. I just clone via command line and it's there in seconds, then I just add the local repo to Sourcetree instead.

Atom editor "permission denied" | OSX 10.9.4 Mavericks

Just switched to OSX from windows, so sorry if this is a simple fix.
Every time I create a new file within Atom I get this error.
EACCES, permission denied '{File Path}.'
I have already changed the permissions of the actual app in the applications folder but does not seem to have worked.
I also noticed when I save files Atom Helper will prompt me for a password at random.
Obviously something is wonky.
Thanks in advance for any help!
Nvm, figured it out.
Turns out the particular folder was generated by Jekyll using "sudo" inside my shell script.
If I generate a new project sans sudo it works fine.
Independent of what has caused the folder content to be not writable, a simple workaround is to open your file in Atom from terminal (like how described here) but prepend sudo to open Atom as super user, e.g.
sudo atom myfile.txt

"No such file or directory - getcwd" error on rubygems on Mac Os Lion

I'm trying to launch a heroku console that uses rubygems but I keep getting this error:
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:471:in `expand_path': No such file or directory - getcwd (Errno::ENOENT)
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:471:in `find_files'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:470:in `map'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:470:in `find_files'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:1103
from /usr/bin/heroku:9:in `require'
from /usr/bin/heroku:9
I'm using Mac OS Lion 10.7.3. Any ideas on how to fix this? Thanks!
Maybe the current working directory of the shell that's used to start your heroku process doesn't exist (maybe removed by another process, as in my case), and therefore getcwd throws an error.
This happened to me. It turned out I had deleted the folder I was running the command in.
I had that same issue.... running sudo gem update --system fixed the problem... give it a try.
I had the same thing, just type cd in the terminal, then navigate back to where you were and it works.
Tried starting the rails server in another console tab.
cd . solved it for me
Faced a similar issue while setting up rails app locally.
The issue was that the server was running in a directory which i had removed from another terminal window to recreate the app.
Close terminal and do it again or go to some other directory and come back and do it...
Anything should work..It did for me.
I encounter a same one, it happened when the working directory has actually been removed.
This doesn't appear to be Heroku issue as something in your code is requiring this getcwd.
What happens if you run this application locally in production mode? Have you defined all of your dependencies for Heroku (either via a .gems file or Bundler)
In my case, I was in a directory that had "unusual" characters in its name: /Volumes/Members/Finance & Accounting/-MC 2008, 7848/2020.
And also, I was in a remote directory, as Mac users will recognize.
I simply did push ~ and ran the command again, then did popd to get back to my remote directory with odd characters in the name.
It could be that gem is ill-behaved in the face of directory names containing whitespace, or it could be that it doesn't work on networked directories.
The bash built-in pwd worked just fine in the remote directory with the funny name.
This whole thing makes me a bit nervous about gem.
solved for me
cd ..
cd -
you have to go back and return to current directory.
Ended up on this page from searching for the same error on AWS Elastic beanstalk.
The problem with getcwd is because EB is trying to repeat the deployment process endlessly. It changes the /var/app/staging directory before it is able to finish the current action. getcwd fails because the directory was already replaced. Try deploying a stable version or a sample app
This just happened to me while I was running a Sinatra app on my localhost and this is what I found.
Scenario:
I'm using Git as my version control and I switched branches from development to master to merge my branches. After the merge, with an active server running, I made a minor html change which shouldn't have blown up the app and when I went to check the change in my broswer my "request" came back with OP's error - just to note this app isn't deployed to heroku.
My guess:
I'm not familiar with the intricacies of Webbrick (or equivalent programs) but I'm guessing you had an active server running (like me) and it was was looking for specific file(s) in memory and when they were modified on a possible branch change or an important file was modified/deleted - Webbrick freaked out and didn't know where to find it/them and threw up this error.
I'm not sure what version control you're using but I know git is popular for heroku so I think this might have something to do with your issue.
Fixing the issue for myself was as simple as restarting the server, hope this helps future trouble shooters.
I solved this problem by closing and restarting my terminal, setting the correct Ruby version in the new Terminal to
$ rvm use 2.1.1
(or whatever Ruby version is relevant to your program)
as explained by gerardk
you could try this before launching back heroku console
$ pwd #ie: /mywork
$ cd ..
$ cd [pwd] #ie: cd mywork
now go launch back heroku console
Restart system fixed this problem in my case
I worked around this error by shutting down the server, restarting my terminal, then restarting the server.
sudo gem update --system (as Israfil Havilah mentioned) and rebooting the server (Ubuntu 16.04.6 LTS) helped me
Make sure, you are not switching git branches. To me, it happened due to switching between GIT branches deleted my folder.

Resources