1

Yellow, I have tried setting up the option "Accessing (Pushing to) Github without username and password" following these steps... https://medium.com/@amanze.ogbonna/accessing-pushing-to-github-without-username-and-password-3022feb077fb

But now I get an error that I can't seem to shake:

ficho@ficho-PS63-Modern-8M:~/Desktop/FUTSAL CUP 2020/www$ git push
fatal: 'origin' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

ficho@ficho-PS63-Modern-8M:~/Desktop/FUTSAL CUP 2020/www$ git remote -v
github  https://github.com/FilipZafran/FutsalCup.git (fetch)
github  https://github.com/FilipZafran/FutsalCup.git (push)
origin  origin (fetch)
origin  origin (push)

I am using Ubuntu 18.4.

This is the Github repo: https://github.com/FilipZafran/FutsalCup

Not sure what I messed up...

cristianoms
  • 3,456
  • 3
  • 26
  • 28
FilipZafran
  • 315
  • 1
  • 5
  • 14
  • 1
    Does this answer your question? [fatal: 'origin' does not appear to be a git repository](https://stackoverflow.com/questions/15637507/fatal-origin-does-not-appear-to-be-a-git-repository) – phd Feb 26 '20 at 12:54
  • https://stackoverflow.com/search?q=%5Bgit%5D+fatal%3A+%27origin%27+does+not+appear+to+be+a+git+repository – phd Feb 26 '20 at 12:54
  • I saw that one, but I was not able to follow... I dont believe its the same issue.... – FilipZafran Feb 26 '20 at 12:58

1 Answers1

4
  • The origin is a conventional default name for remote repository. It means that running git push will try to push commits to the origin repository.
  • Look at your list of remotes. You have defined repository called github, while origin has no proper url defined.
  • To fix that I would remove all remotes and add it again properly:
git remote remove origin
git remote remove github
git remote add origin git@github.com:FilipZafran/FutsalCup.git
BugHunter
  • 119
  • 6
  • Hey Bug Hunter, thank you for your response. I followed your instructions, but then I tried pushing again I got new errors: – FilipZafran Feb 26 '20 at 12:56
  • ficho@ficho-PS63-Modern-8M:~/Desktop/FUTSAL CUP 2020/www$ 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 – FilipZafran Feb 26 '20 at 12:56
  • ficho@ficho-PS63-Modern-8M:~/Desktop/FUTSAL CUP 2020/www$ git push origin mastergit@github.com: Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. – FilipZafran Feb 26 '20 at 12:56
  • ficho@ficho-PS63-Modern-8M:~/Desktop/FUTSAL CUP 2020/www$ git push --set-upstream origin master git@github.com: Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. – FilipZafran Feb 26 '20 at 12:56
  • Did you setup SSH properly? See: https://help.github.com/en/github/authenticating-to-github/error-permission-denied-publickey – BugHunter Feb 26 '20 at 14:46