Sample Header Ad - 728x90

Ask Different (Apple)

Q&A for power users of Apple hardware and software

Latest Questions

7 votes
2 answers
11638 views
How can I delete a keychain password for github and vscode?
The way of deleting keychain access codes is to open the keychain access control and right click on the code and delete which worked before . [![][1]][1] But Now It doesn't and when I press delete nothing happens . How can I force delete any keychain access ? Is there a way by doing this with termin...
The way of deleting keychain access codes is to open the keychain access control and right click on the code and delete which worked before . Image But Now It doesn't and when I press delete nothing happens . How can I force delete any keychain access ? Is there a way by doing this with terminal ?
Mehdi Faraji (505 rep)
May 23, 2021, 03:20 PM • Last activity: Jul 8, 2025, 07:30 AM
4 votes
2 answers
117 views
Change default app for all .gitignore files
I have a bunch of `.gitignore` files, spread across multiple folders. I want to change the default app for all current and future .gitignore files. I tried to do this via `Get Info` -> `Open with` -> `Sublime text` -> `Change All`. I get the following error: >An error occurred while changing the app...
I have a bunch of .gitignore files, spread across multiple folders. I want to change the default app for all current and future .gitignore files. I tried to do this via Get Info -> Open with -> Sublime text -> Change All. I get the following error: >An error occurred while changing the application that opens ".gitignore" because not enough information is available. I tried to do this via duti and it didn't work. duti says that 'com.sublimetext.4' is associated with all .gitignore files: duti -x gitignore Sublime Text /Applications/Sublime Text.app com.sublimetext.4 but .gitignore (existing and new) files are still being opened with TextEdit.
James (143 rep)
Aug 25, 2023, 04:03 AM • Last activity: Feb 12, 2025, 01:29 PM
0 votes
1 answers
3276 views
Unable to Install Homebrew; Failed during: git fetch --force origin
I'm having an installation problem with Homebrew; it involves git I ran the command from my terminal, M1pro, with git installed. I tried to do use ```port``` but I was unable to install it I tried to do ```git global url insteadOf(https:// for git:// or @git) setup``` but it still doesn't work. This...
I'm having an installation problem with Homebrew; it involves git I ran the command from my terminal, M1pro, with git installed. I tried to do use
but I was unable to install it I tried to do
global url insteadOf(https:// for git:// or @git) setup
but it still doesn't work. This is the error from terminal:
amaku@Davids-MacBook-Pro ~ % /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh) "
==> Checking for sudo access (which may request your password)...
Password:
==> This script will install:
/opt/homebrew/bin/brew
/opt/homebrew/share/doc/homebrew
/opt/homebrew/share/man/man1/brew.1
/opt/homebrew/share/zsh/site-functions/_brew
/opt/homebrew/etc/bash_completion.d/brew
/opt/homebrew

Press RETURN to continue or any other key to abort:
==> /usr/bin/sudo /usr/sbin/chown -R amaku:admin /opt/homebrew
==> Downloading and installing Homebrew...
fatal: remote error: 
  The unauthenticated git protocol on port 9418 is no longer supported.
Please see https://github.blog/2021-09-01-improving-git-protocol-security-github/  for more information.
Failed during: git fetch --force origin
The blog says there's a security update, idk?
Amaku (51 rep)
Mar 17, 2022, 08:51 PM • Last activity: Dec 12, 2024, 10:01 PM
2 votes
1 answers
247 views
How can I apply security updates to the git client that comes with Xcode?
I am looking at how to upgrade my git client that comes with Xcode command line tools in the light of the recent vulnerability announcement. Is this possible?
I am looking at how to upgrade my git client that comes with Xcode command line tools in the light of the recent vulnerability announcement. Is this possible?
Russell Fulton (242 rep)
May 21, 2024, 06:29 AM • Last activity: Oct 18, 2024, 06:31 PM
1 votes
1 answers
433 views
Git user.name continuously removed/reset
At least once a day it seems that my Git global configuration value for `user.name` gets reset to a blank value. Of course I only find out when I go to commit and it barks at me. I've tried removing and readding, replacing all matching keys. Here are the following specs/configs I would think are rel...
At least once a day it seems that my Git global configuration value for user.name gets reset to a blank value. Of course I only find out when I go to commit and it barks at me. I've tried removing and readding, replacing all matching keys. Here are the following specs/configs I would think are relevant: - MacBook Pro 15,1 (2018) - macOS 11.1 - iTerm2 v3.4.3 - Git v2.24.3 (Apple Git-128) I also have Oh My Zsh installed, master commit SHA b28665a.
CosmicKetchup (41 rep)
Dec 25, 2020, 04:19 AM • Last activity: Sep 20, 2024, 02:10 PM
237 votes
14 answers
260336 views
How to use the Homebrew installed git on Mac?
I have installed the newest version of git (1.8.3) using homebrew but when I type git --version in my terminal, it prints: git version 1.7.10.2 (Apple Git-33) What should I do to replace the old version of git with the new one?
I have installed the newest version of git (1.8.3) using homebrew but when I type git --version in my terminal, it prints: git version 1.7.10.2 (Apple Git-33) What should I do to replace the old version of git with the new one?
Levani (4515 rep)
Jun 3, 2013, 11:50 AM • Last activity: Jul 1, 2024, 08:45 AM
3061 votes
8 answers
2588486 views
Why am I getting an “invalid active developer path” when attempting to use Git after upgrading to macOS Sequoia?
After upgrading to macOS Sequoia, I tried to run `git` from Terminal but it kept giving me the following error: `xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun`. How do I fix it?
After upgrading to macOS Sequoia, I tried to run git from Terminal but it kept giving me the following error: xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun. How do I fix it?
onin (67665 rep)
Sep 24, 2016, 07:09 PM • Last activity: Jun 15, 2024, 03:56 PM
36 votes
6 answers
31855 views
My Automator Workflow fails because it fails to find the git command within the 'Run Shell Script' command? Need help
I have an Automator workflow and one of the actions is to clone a repository. Here's the code for the 'Run Shell Script' action. The command is run within the Bash shell `/bin/bash` if that matters: SOURCEDIR="${3/\/Volumes/}" cd "$2" REPOURL="bob@somedomain.com:$SOURCEDIR" WORKINGDIR="$1" # Capture...
I have an Automator workflow and one of the actions is to clone a repository. Here's the code for the 'Run Shell Script' action. The command is run within the Bash shell /bin/bash if that matters: SOURCEDIR="${3/\/Volumes/}" cd "$2" REPOURL="bob@somedomain.com:$SOURCEDIR" WORKINGDIR="$1" # Capture any errors with cloning process in log file git clone "$REPOURL" "$WORKINGDIR" &> ./log.txt // For debugging echo "exit code: $?" echo "PPID: $PPID" open . Now the Automator App runs fine on my machine. The path to git on my machine (A Macbook Pro) is: /usr/bin/git (I believe I installed git on my machine through Xcode) But on my co-worker's machine (Also a Mac Pro) the Automator App fails. In fact, the output of the log.txt file says: bash: git: command not found Now on my co-worker's machine the path to git is: usr/local/git/bin, which, yes, is different because he installed git through the Google Git Installer for Mac OS X, but I didn't think it should matter because in the script the git command is not absolute path to the command and further more my co-worker can run git normally from a Bash script but when invoked directly from the Terminal. So what gives? Why does the automator workflow work for me but not for my co-worker? There must be something fundamental about Bash or Unix that I'm not understanding here but I'm lost.
racl101 (483 rep)
Jul 29, 2013, 08:34 PM • Last activity: May 21, 2024, 10:53 PM
12 votes
3 answers
6664 views
Is it dangerous to leave “.DS_Store” files left in Git commit history?
I forgot to add it to my `.gitignore` and although I've added `.DS_Store` to my `.gitignore` now, I was wondering if it was dangerous to leave for anyone to see in my Git commit history? I'm not asking if `.DS_Store` files should be in my repo or not, but I'm asking if I should remove them from my *...
I forgot to add it to my .gitignore and although I've added .DS_Store to my .gitignore now, I was wondering if it was dangerous to leave for anyone to see in my Git commit history? I'm not asking if .DS_Store files should be in my repo or not, but I'm asking if I should remove them from my *previous* commits, because if you go to my commit history, you can access this file. It's already been removed from my current commit.
chung (223 rep)
Apr 3, 2024, 09:14 PM • Last activity: Apr 7, 2024, 01:51 PM
10 votes
4 answers
38467 views
How much disk space do the "command line developer tools" take up?
When I run `git --version` in the Terminal, I get prompted to install the "command line developer tools": [![Prompt for installing command line developer tools][1]][1] What exactly do I get from these "command line developer tools", and how much disk space will the installation use up? I don't want...
When I run git --version in the Terminal, I get prompted to install the "command line developer tools": Prompt for installing command line developer tools What exactly do I get from these "command line developer tools", and how much disk space will the installation use up? I don't want to drag along a whole bunch of useless programs just because I want to use a single command. (Assume that I do not want to use Homebrew, for whatever reason. The question is asking about the disk space used up by an installation of Apple's "command line developer tools").
Flux (243 rep)
Apr 3, 2021, 09:36 AM • Last activity: Mar 31, 2024, 05:38 PM
1 votes
1 answers
953 views
Hpw can I fix auto complete with git after a macOS update?
My command line autocomplete isn't working with many third party binaries. This started with a macOS Ventura 13.5 dot update. I try to tab to operate a previously working autocomplete for git commands, they fail. How can I fix this?
My command line autocomplete isn't working with many third party binaries. This started with a macOS Ventura 13.5 dot update. I try to tab to operate a previously working autocomplete for git commands, they fail. How can I fix this?
thomas-peter (131 rep)
Jul 24, 2023, 11:51 AM • Last activity: Feb 19, 2024, 10:33 PM
485 votes
16 answers
327302 views
git auto-complete for *branches* at the command line?
On my Linux machine I have autocomplete _for branches_ with Git. [Note we are talking about git branch completion, *not* bash completion (e.g. commands, files, etc). Thus NOT [Lane's answer](https://apple.stackexchange.com/a/92637/145449) at all] For example I can type `git checkout`+ TAB and get a...
On my Linux machine I have autocomplete _for branches_ with Git. [Note we are talking about git branch completion, *not* bash completion (e.g. commands, files, etc). Thus NOT [Lane's answer](https://apple.stackexchange.com/a/92637/145449) at all] For example I can type git checkout+TAB and get a list of branches. Or I can type git checkout feb*+TAB to get all branches that begin with "feb". How can I get this functionality on a Mac? I tried downloading and running bash-completion/bash_completion and bash-completion/bash_completion.sh.in but no joy. The first gave error messages about declare: -A invalid_option. The second gave no errors. When I git checkout+TAB though I am still getting a list of files in the directory, not branches. I am in the project root. Auto-complete for directories and bash commands are working ok, so it's specific to Git.
Michael Durrant (17576 rep)
Jul 8, 2012, 06:25 PM • Last activity: Jan 26, 2024, 03:24 PM
4 votes
3 answers
2331 views
Git hangs with a ssh remote URI after 10.15.4 update
After updating to Catalina 10.15.4, `git` started hanging indefinitely when trying to push or pull from a repo that was previously accessible. ``` $ git push origin master ^C ``` The URL for `origin` looks like: ``` $ git remote -v origin ssh://git@gitlab.example.com:30814/username/project.git (fetc...
After updating to Catalina 10.15.4, git started hanging indefinitely when trying to push or pull from a repo that was previously accessible.
$ git push origin master
^C
The URL for origin looks like:
$ git remote -v
origin	ssh://git@gitlab.example.com:30814/username/project.git (fetch)
origin	ssh://git@gitlab.example.com:30814/username/project.git (push)
Attempting to ssh directly to the remote results in a hang:
$ /usr/bin/ssh -p 30814 git@gitlab.example.com -vvv
OpenSSH_8.1p1, LibreSSL 2.7.3
debug1: Reading configuration data /Users/username/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 47: Applying options for *
debug1: Connecting to gitlab.example.com port 30814.
^C
Which seems to indicate the underlying problem with git is the ssh:// URI for the remote repository. I confirmed this by successfully cloning the repo using a https:// URI.
Erik (531 rep)
Mar 31, 2020, 06:15 PM • Last activity: Jan 11, 2024, 10:22 PM
5 votes
2 answers
2393 views
zsh: bus error with git on SMB volume
I regularly work with `git` on an SMB mounted share on my MacBook. Recently I get this error every time I try to run certain git commands: `zsh: bus error git status`. The same error happens with log, diff, and show. But other commands like `git remote` work fine. From my searches online, this error...
I regularly work with git on an SMB mounted share on my MacBook. Recently I get this error every time I try to run certain git commands: zsh: bus error git status. The same error happens with log, diff, and show. But other commands like git remote work fine. From my searches online, this error suggests the memory address is not accessible. I don't have any problems running git on a local folder. And I haven't noticed any other problems with this SMB mount; I can read/write files. The problem only happens with git on SMB. I tried switching to bash and it has the same issue:
bash-3.2$ git status -v
Bus error: 10
I believe the repo itself is okay because I can run git commands via SSH on the remote server with no issue. I believe this problem started when I upgraded to Ventura. I'm currently on 13.2.1 with git version 2.37.1 (Apple Git-137.1)
Elliott (3049 rep)
Mar 13, 2023, 05:40 AM • Last activity: Nov 5, 2023, 07:00 AM
3 votes
0 answers
2054 views
Adding own certificate authority to macOS
I currently facing the problem that I created a certificate authority certificate and would like to add this custom CA to macOS. The general way would be to add it to the "System" area in my key chain and trust the certificate. This works fine for e.g. browsers. Now I would like to use command line...
I currently facing the problem that I created a certificate authority certificate and would like to add this custom CA to macOS. The general way would be to add it to the "System" area in my key chain and trust the certificate. This works fine for e.g. browsers. Now I would like to use command line tools like git and curl or one of intellij's IDEs. But then I am running into the following error message:
SSL certificate problem: unable to get local issuer certificate
I found out that curl on macOS is using LibreSSL. So my assumption would be that LibreSSL is not looking into macOS keychain. Do I think in the right direction? Or do I need to add my CA certificate to an additional directory?
user182351 (31 rep)
Oct 17, 2023, 03:57 PM • Last activity: Oct 17, 2023, 05:22 PM
2 votes
1 answers
1598 views
`git commit` is stuck on macOS Ventura
Today I woke up and realised I cannot `commit` anymore... Strangely enough other `git` commands work fine. Whenever I create a new directory, `git init .` inside, `touch` a new, empty file inside, `git add` it, and then run `git commit -am "test"` the command gets stuck. I wait for 10 minutes and no...
Today I woke up and realised I cannot commit anymore... Strangely enough other git commands work fine. Whenever I create a new directory, git init . inside, touch a new, empty file inside, git add it, and then run git commit -am "test" the command gets stuck. I wait for 10 minutes and nothing happens... My OS version: macOS 13.4.1; MacBook Pro 2017.
$ git --version
git version 2.39.2 (Apple Git-143)

$ which git
/usr/bin/git
I have been googling around a little and tried two other git installations: the one from Homebrew installed with brew install git and the one from Conda installed with conda install -c conda-forge git. No luck. I have reinstalled my XCode Command line Tools with first removing them and then xcode-select --install (~15GB download and 10min installation). No luck. Did anyone else experienced anything similar?
maciek (151 rep)
Aug 15, 2023, 04:13 PM • Last activity: Aug 16, 2023, 08:23 AM
0 votes
2 answers
16753 views
fatal: unable to access ... Recv failure: Connection reset by peer
i run this in terminal git clone https://gitlab.com/azzammuhammadnaufal/nyoba.git and out this Cloning into 'nyoba'... but, i get this message fatal: unable to access 'https://gitlab.com/azzammuhammadnaufal/nyoba.git/': Recv failure: Connection reset by peer anyone know why i get this message and ho...
i run this in terminal git clone https://gitlab.com/azzammuhammadnaufal/nyoba.git and out this Cloning into 'nyoba'... but, i get this message fatal: unable to access 'https://gitlab.com/azzammuhammadnaufal/nyoba.git/ ': Recv failure: Connection reset by peer anyone know why i get this message and how to repair it, THANKS
Azzam Muhammad Naufal (1 rep)
Dec 27, 2022, 04:24 AM • Last activity: Jun 21, 2023, 10:25 AM
1 votes
1 answers
695 views
SSH key not being added to ssh-agent automatically
OS version is Ventura 13.2 I generated an SSH key to authenticate git operations with GitHub according to [their guide][1]. Followed the steps: 1. `ssh-keygen -t ed25519 -C "my identifier"` (Without passphrase. Saved to `~/.ssh/github`) 2. `eval "$(ssh-agent -s)"` 3. `touch ~/.ssh/config` 4. Added t...
OS version is Ventura 13.2 I generated an SSH key to authenticate git operations with GitHub according to their guide . Followed the steps: 1. ssh-keygen -t ed25519 -C "my identifier" (Without passphrase. Saved to ~/.ssh/github) 2. eval "$(ssh-agent -s)" 3. touch ~/.ssh/config 4. Added this to ~/.ssh/config:
Host *.github.com
  AddKeysToAgent yes
  IdentityFile ~/.ssh/github
5. ssh-add ~/.ssh/github When testing the connection with ssh -T git@github.com it is successful, but after rebooting, closing the terminal, restarting vscode, etc, I have to manually re-add the SSH key using ssh-add again; otherwise I'm met with the error: git@github.com: Permission denied (publickey). I expect the key to be added to the SSH agent automatically so that I may perform git operations without having to manually add the key to the SSH agent every time. It used to work before on my old MBP. How can I solve this?
WarningSign (11 rep)
Feb 2, 2023, 05:00 PM • Last activity: Jun 8, 2023, 03:23 PM
1 votes
1 answers
67 views
Can not delete file on removable device
(This is on MacOS Monterey) When performing a backup using `rsync --delete ....` to a USB stick, I noticed that there was a file which rsync could not delete, with error message _Operation not permitted_. I could verify this when I did manually a `rm -f ...` of this file. Checking the permissions of...
(This is on MacOS Monterey) When performing a backup using rsync --delete .... to a USB stick, I noticed that there was a file which rsync could not delete, with error message _Operation not permitted_. I could verify this when I did manually a rm -f ... of this file. Checking the permissions of the file using stat, I see 16777231 936844 -rwxrwxrwx 1 ronaldfischer staff 0 692785057 "Mar 28 09:40:06 2023" "Sep 28 14:41:38 2020" "Sep 28 14:41:38 2020" "Nov 11 10:54:25 2022" 131072 1353216 0x2 /Volumes/SANKESU/gitwrk/vp5-e/.git/modules/repository/objects/pack/pack-f9012a97f8775c87b9d24fc0b4c276b883a6eb6a.pack and checking the permissions on the directory which holds this file, I see 16777231 1125079 drwxrwxrwx 1 ronaldfischer staff 0 131072 "Nov 11 10:54:10 2022" "Apr 11 15:44:46 2023" "Apr 11 15:44:46 2023" "Nov 11 10:54:11 2022" 131072 256 0 /Volumes/SANKESU/gitwrk/vp5-e/.git/modules/repository/objects/pack It does not look like a permission problem. What could be the reason? BTW, from the time stamp given in the _stat_ command, I can conclude that both directory and file had been created by a rsync running on Windows/Cygwin, but I don't see how this would explain the error message. Other files in the backup of my repo are deleted without problems by _rsync_. Problems seem to occur only in entries which are located below .git/objects. I am aware that when doing the backup, there is no real need to backup the directory .git as well (except that when doing it, I can cd into the backup of my repository and perform git commands), but still I would like to know the reason for this problem.
user1934428 (1458 rep)
May 31, 2023, 11:13 AM • Last activity: Jun 1, 2023, 01:04 PM
0 votes
1 answers
27 views
Gihub on Mac using oath2
After a pause of 2 years from macOS I bought a new laptop to find this problem: I cannot pull/push to my repositories using a user/password. The new approach is through oath2. At this point, I am able to push/pull from my own repositories but I cannot do that for the parent of a forked repo or pull...
After a pause of 2 years from macOS I bought a new laptop to find this problem: I cannot pull/push to my repositories using a user/password. The new approach is through oath2. At this point, I am able to push/pull from my own repositories but I cannot do that for the parent of a forked repo or pull from my own organization. The new approach is: git clone https://@github.com/owner/repo.git My question is: how to apply this approach to pull from a repo that I have in my organization or a parent repo?
Rafael Zemog (1 rep)
May 17, 2023, 02:18 PM • Last activity: May 17, 2023, 03:50 PM
Showing page 1 of 20 total questions