5

When I push my repo it throws me the message:

$ git push origin master fatal: 'https // github.com / PanteraSama / landingPageResponsive.git' 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.

Investigating I configured the ssh key on github, But when I want to commit again it doesn't let me either. can you help me?

5
  • Do you have access to the repository on GitHub? Commented Apr 26, 2020 at 1:45
  • Is that the exact URL you used? In other words, you copied and pasted the output from your terminal into the question? Commented Apr 26, 2020 at 2:23
  • 1
    did you try to use [email protected]:PanteraSama/landingPageResponsive.git Commented Apr 26, 2020 at 3:11
  • 1
    What does "ssh -T [email protected]" returns to you when you write it in terminal? Commented Apr 26, 2020 at 9:05
  • $ ssh -T [email protected] Hi PanteraSama! You've successfully authenticated, but GitHub does not provide shell access. Commented Apr 26, 2020 at 23:45

1 Answer 1

4

According to the output you've provided, your URL has spaces and is missing the colon after https. As a result, Git thinks of this as a relative local path and tries to push to it, but fails because that path doesn't exist.

You would fix this by running the following:

$ git remote set-url origin https://github.com/PanteraSama/landingPageResponsive.git

If you mistyped the output in your question and your URL is in fact correct in your code, then the likely issue is that this is a private repo and you don't have the proper credentials. SSH keys are used only for SSH access and aren't used for HTTPS, which uses a username and password (or more securely, a username and token).

Sign up to request clarification or add additional context in comments.

2 Comments

I changed the url, you're right, the url was wronge (https://) and the results is: $ git push origin master remote: Permission to PanteraSama/landingPageResponsive.git denied to connietubio. fatal: unable to access 'github.com/PanteraSama/landingPageResponsive.git': The requested URL returned error: 403 My repo is public
If you're getting a 403, your credentials are bad. If you're using 2FA, you need to use a personal access token instead of your password. You can search StackOverflow for 403 and GitHub and you should find answers to help you out.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.