I am trying to find the list of all git repositories on my local machine. I do get all of them but I also get some repositories which have Permission denied in the output
find . -name .git -type d -prune | sed '/Permission/d'
The output of the command is
find: ./.Trash/Fuze_old.app/Contents/Frameworks/Fuze Helper.app: Permission denied
./.nvm/.git
./.oh-my-zsh/.git
./.Trash/AutoLayout/.git
./.Trash/DemoProject/.git
find: ./Library/Python: Permission denied
./.Trash/NavView/.git
./.Trash/Something/.git
./.zsh/zsh-autosuggestions/.git
I do not want the lines with Permission denied.
How do I get that?