Reputation: 225
I have just clone repo an then make one commit add it and was trying to push it - but have this error:
Any ideas how can I fix this evill?
Upvotes: 6
Views: 40271
Reputation: 417
If you have changed your password, you can use
git remote show origin
This will prompt for a username and password wherein you can enter your credentials.
Upvotes: 7
Reputation: 11
maybe you change your password.
I has the same problem,then use upstairs method works.
Remember to replace url [email protected]:user/repo.git
by yourself.
git remote -v
git remote remove origin
git remote add origin [email protected]:user/repo.git
Upvotes: 0
Reputation: 35884
Regarding two factor authentication - after re-enabling 2fa I had to delete and re-add the remote endpoint for git to successfully pull.
# ERROR: Repository not found.
# fatal: Could not read from remote repository.
# copy and paste ssh destination [email protected]:user/repo.git
git remote -v
git remote remove origin
git remote add origin [email protected]:user/repo.git
Upvotes: 1
Reputation: 883
I had the same problem with my first GitHub repository just now. In my case, the problem was related to having enabled two-factor authentication. I had GitHub make an authentication token since the command line tools aren't aware of two-factor authentication.
The problem was that double-clicking the token to select it somehow selected a space to its left as well, resulting in me copying an invalid code. Carefully click-dragging from one end of the token to the other worked.
Upvotes: 10
Reputation: 1323115
If you want to push to https://github.com/AntonDerenivsky/lado, you should use the credentials of AntonDerenivsky.
Using 'fresa
' would only work if fresa
has been declared as collaborator for AntonDerenivsky/lado
repo.
Or you need to fork that repo, and use:
git remote rename origin upstream
git remote add origin https://[email protected]/fresa/lado
git push -u origin master
If AntonDerenivsky is your gitHub account, the the login to use is 'AntonDerenivsky', not 'fresa'.
Upvotes: 5