ERROR: Error fetching remote repo'origin' was reported when building the project. The main reason is that the user credentials are set incorrectly.
Steps to add and use user credentials:
Go to the service to view the private key:
cd ~/.ssh cat id_rsa
The scope of the copied content is in the red box as shown in the figure below
Go to create Jenkins user credentials
I chose ssh here.
github code path, ssh is selected.