I have ubuntu 20.04 LTS
I'm trying to connect my local jenkins to github repo, where is my Jenkinsfile but I'm always getting this error:
Failed to connect to repository: Command "/usr/bin/git ls-remote -h -- https://github.com/RaulMartinezL/almacen_infinito HEAD" returned status code 128: stdout: stderr: remote: Invalid username or password. fatal: Authentication failed for ' https://github.com/RaulMartinezL/almacen_infinito/ '
I don't know what is going on because I have exactly the same path '/usr/bin/git' setup on PyCharm and it does work for cloning repositories. In fact, it is the same repository.
Then I check on terminal the path, and I get this:
bash: cd: usr/bin/git: Not a directory
I have checked this commands too:
which git:
/usr/bin/git
type git:
git is hashed (/usr/bin/git)
I don't know what is wrong and why the path works on PyCharm and not on Jenkins.
the error states username / password error.
cd: usr/bin/git: Not a directory
correct, because git is executable. not directory.
check your username and password.
To add a credential, click on “Add” next to “Credentials” -> Select “Jenkins Credential Provider”, this will display the following add credentials screen.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.