0
After committing a file and giving the "Git push origin master" command, an error happens giving the message:
fatal: could not read Username for 'https://github.com': No such file or directory
How to solve ?
0
After committing a file and giving the "Git push origin master" command, an error happens giving the message:
fatal: could not read Username for 'https://github.com': No such file or directory
How to solve ?
2
Tercio, Your repository has been set up wrong. To confirm, type:
git remote show origin -n
Check that Fetch URL and Push URL are pointing to your repository if they are not:
Remove the current
git remote rm origin
And include again
For SSH
git remote add origin '[email protected]:seu_usuario/seu_repositorio.git'
or if you are using HTTPS
git remote add origin 'https://[email protected]/usuario_dono_repositorio/nomerepositorio.git'
2
I follow the following commands when committing:
git status
git add . ou git add -A
git commit -m "mensagem"
git pull origin master /*deve-se criar o remote 'origin' antes*/
git push origin
1
There is an answer to this question in English stackoverflow.
In the answer and suggested the execution of commands:
git remote rm origin
git remote add origin '[email protected]:username/repo.git'
Anyway, it is also suggested to remove "https", and use only the domain "github.com".
I tried too! I will reinstall! It must be windows bug!
0
Within your project there must be a folder called ". git". Enter this folder, and make sure that the "config" file has the correct address.
[remote "origin"]
url = https://[email protected]:usuario/projeto.git
fetch = +refs/heads/*:refs/remotes/origin/***texto em negrito**
If it’s not correct, change the url by the file. If it doesn’t work, give a git status and paste it here so we can look better.
that’s correct! I’ve tried everything! I’ll reinstall to see! Detail, it’s windows GIT BASH!
Browser other questions tagged github
You are not signed in. Login or sign up in order to post.
I checked and you have the correct information. The error persists...
– Tercio
A question: in '[email protected]:seu_usuario/seu_repositorio.git' your user must be my ? I can send to a different URL ?
– Tercio
1-It must be yours. 2 - It can be any other repository.
– Cleiton
I tried everything and nothing worked! Must be windows bug!
– Tercio