I encountered this error when doing a git push
:
fatal: could not read Username for 'https://usts.visualstudio.com': No such file or directory
Looks like I have hit a bug in git 1.8.5 as mentioned here: https://stackoverflow.com/a/20884273/45603
Google led me to this post: https://stackoverflow.com/a/20871910/45603
So, I ran git remote rm origin
followed by git remote add origin 'git@github.com:username/repo.git'
Now I get the following message whenever I do a git push
:
fatal: The current branch master has no upstream branch.
To push the current branch and set the remote as upstream, use
git push --set-upstream origin master
I would like to undo the git remote rm origin
and rollback to git 1.8.4.
How do I undo git remote rm origin
?
Edit: Running git push --set-upstream origin master
(as advised by git) gives me the following error:
ssh: connect to host usts.visualstudio.com port 22: Bad file number
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.