Jenkins git and shell doesn't working in macos agent after brew update & upgrade

Jenkins setup:

Jenkins Version: 2.440.1
Node: MacOS Sonoma 14.3.1 (AWS EC2)

Today as was performing a issue to use cocoapods in the agent os. To solve this I updated CA Certificates in the server using “brew update && brew upgrade”

And after upgrade the dependencies in the server i perform the below issue to use the git plugin and Execute shell section:

Git error:
ERROR: Error cloning remote repo ‘origin’
hudson.plugins.git.GitException: Could not init /Users/ec2-user/jenkins/workspace/test

On fridat was working fine. GIT was upgraded from

2.43.2 -> 2.44.0

Shell error:
[test] $ /bin/sh -xe /var/folders/nm/xdlnygrs08n5gv_g4s281jzh0000gn/T/
FATAL: command execution failed error=2, No such file or directory

This is the shell script:

export PATH=/usr/local/bin:/usr/local/opt/node@20/bin:/usr/local/opt/ruby/bin:$PATH
git -v

Looks like the brew command affected a lot of things in the macos agent. Please, any comment will help


Was fichex disconnecting the agent and launching again :smiley: