Showing posts with label git. Show all posts
Showing posts with label git. Show all posts

Thursday, 2 June 2016

error: failed to push some refs to git

error: src refspec master does not match any.
error: failed to push some refs to 'https://github.com/userid/voice.git'

solution :
1. git add -A
2. git status
3. git commit -m "message"
3.git push origin HEAD:<remoteBranch>

Thursday, 12 May 2016

fatal: remote origin already exists.

fatal: remote origin already exists.

git remote add origin https://github.com/voice/voiceApp.git

solution :

1.First remove origin
cmd :  git remote rm origin

2. now add the origin
cmd : git remote add origin https://github.com/voice/voiceApp.git

or

1.set the new git  origin/remote URL
.set the new origin
cmd : git remote set-url origin https://github.com/voice/voiceApp.git


2. Now check origin.

cmd : git remote show origin





Wednesday, 20 April 2016

jenkins,github Failed to connect to repository

Failed to connect to repository : Command "/usr/bin/git -c core.askpass=true ls-remote -h
...
stderr: remote: Invalid username or password

problem : jenkins is trying to handshake with git with the provided credentials. but unable to login.

solution :
1) Go to jenkins homepage.

2) Go to credentials, add git user name and password.

3) Go to jenkins project, select new added credentials from the dropdown.





Friday, 15 April 2016

Failed to connect to repository : Could not init /tmp/hudson

Failed to connect to repository : Could not init /tmp/hudson

1) There's no such executable git in PATH: /sbin, /usr/sbin, /bin, /usr/bin.
In the jenkins job section.
Advanced...
Source Code Management.
got git.
2) Failed to connect to repository : Could not init /tmp/hudson

solution : please install git(as below ) or provide the git exe file path (/usr/bin/git).  

Install git on linux.

command : sudo yum install git-all

ref : https://git-scm.com/book/en/v2/Getting-Started-Installing-Git

now check the git version.
cmd : git --version