Git push repository not found что делать
Перейти к содержимому

Git push repository not found что делать

  • автор:

Проблема удаления репозитория на гите

$ git push remote: Repository not found. fatal: repository ‘https://github.com/account/repository.git/’ not found В чем проблема: Удалил репозиторий через сайт, теперь при пуше оно выдает ошибку. т.е. пушу в новый, а выдает ошибку, что отсутствует старый (ред) пробовал разные способы, которые мне не помогли, может у Вас есть идеи в скрытой папке .git > config Есть такие строчки:

[branch "master"] remote = https://github.com/account/repository.git/ merge = refs/heads/master [remote "remote"] url = https://github.com/account/repository.git/ fetch = +refs/heads/*:refs/remotes/remote/* 

может тут можно что-то пофиксить?

Отслеживать

user177221

задан 26 сен 2018 в 14:41

1 1 1 бронзовый знак

/.git/ перед точкой отсутствует имя репозитория. Возможно сбились настройки адреса в вашем гите

26 сен 2018 в 14:44

Извините, при добавлении сообщения было затерта ссылка, я сдел правки

27 сен 2018 в 3:46

Эммм. вы удалили репозиторий, пушите в него, вам говорят, что его нет. Вопрос почему его нет или какой? можно удалить ветку и пушить в нее, она появится. А вот в отсутствующий репозиторий никак.

27 сен 2018 в 5:30

Я пушу в другой репозитарий

Устранение ошибок клонирования

Если у вас возникли проблемы с клонированием репозитория, рассмотрите эти распространенные ошибки.

В этой статье

HTTPS cloning errors

There are a few common errors when using HTTPS with Git. These errors usually indicate you have an old version of Git, or you don’t have access to the repository.

Here’s an example of an HTTPS error you might receive:

> error: The requested URL returned error: 401 while accessing > https://github.com/USER/REPO.git/info/refs?service=git-receive-pack > fatal: HTTP request failed 
> Error: The requested URL returned error: 403 while accessing > https://github.com/USER/REPO.git/info/refs > fatal: HTTP request failed 
> Error: https://github.com/USER/REPO.git/info/refs not found: did you run git > update-server-info on the server? 

Check your Git version

There’s no minimum Git version necessary to interact with GitHub, but we’ve found version 1.7.10 to be a comfortable stable version that’s available on many platforms. You can always download the latest version on the Git website.

Ensure the remote is correct

The repository you’re trying to fetch must exist on GitHub.com, and the URL is case-sensitive.

You can find the URL of the local repository by opening the command line and typing git remote -v :

$ git remote -v # View existing remotes > origin https://github.com/ghost/reactivecocoa.git (fetch) > origin https://github.com/ghost/reactivecocoa.git (push) $ git remote set-url origin https://github.com/ghost/ReactiveCocoa.git # Change the 'origin' remote's URL $ git remote -v # Verify new remote URL > origin https://github.com/ghost/ReactiveCocoa.git (fetch) > origin https://github.com/ghost/ReactiveCocoa.git (push) 

Alternatively, you can change the URL through our GitHub Desktop application.

Provide an access token

To access GitHub, you must authenticate with a personal access token instead of your password. For more information, see «Managing your personal access tokens.»

If you are accessing an organization that uses SAML SSO and you are using a personal access token (classic), you must also authorize your personal access token to access the organization before you authenticate. For more information, see «About authentication with SAML single sign-on» and «Authorizing a personal access token for use with SAML single sign-on.»

Check your permissions

When prompted for a username and password, make sure you use an account that has access to the repository.

Tip: If you don’t want to enter your credentials every time you interact with the remote repository, you can turn on credential caching. If you are already using credential caching, please make sure that your computer has the correct credentials cached. Incorrect or out of date credentials will cause authentication to fail.

Use SSH instead

If you’ve previously set up SSH keys, you can use the SSH clone URL instead of HTTPS. For more information, see «About remote repositories.»

Error: Repository not found

If you see this error when cloning a repository, it means that the repository does not exist or you do not have permission to access it. There are a few solutions to this error, depending on the cause.

Check your spelling

Typos happen, and repository names are case-sensitive. If you try to clone git@github.com:user/repo.git , but the repository is really named User/Repo you will receive this error.

To avoid this error, when cloning, always copy and paste the clone URL from the repository’s page. For more information, see «Cloning a repository.»

To update the remote on an existing repository, see «Managing remote repositories».

Checking your permissions

If you are trying to clone a private repository but do not have permission to view the repository, you will receive this error.

Make sure that you have access to the repository in one of these ways:

  • The owner of the repository
  • A collaborator on the repository
  • A member of a team that has access to the repository (if the repository belongs to an organization)

Check your SSH access

In rare circumstances, you may not have the proper SSH access to a repository.

You should ensure that the SSH key you are using is attached to your personal account on GitHub. You can check this by typing the following into the command line:

$ ssh -T git@github.com > Hi USERNAME! You've successfully authenticated, but GitHub does not > provide shell access. 

If the repository belongs to an organization and you’re using an SSH key generated by an OAuth app, OAuth app access may have been restricted by an organization owner. For more information, see «About OAuth app access restrictions.»

Check that the repository really exists

If all else fails, make sure that the repository really exists on GitHub.com! If you’re trying to push to a repository that doesn’t exist, you’ll get this error.

Error: Remote HEAD refers to nonexistent ref, unable to checkout

This error occurs if the default branch of a repository has been deleted on GitHub.com.

Detecting this error is simple; Git will warn you when you try to clone the repository:

$ git clone https://github.com/USER/REPO.git # Clone a repo > Cloning into 'repo'. > remote: Counting objects: 66179, done. > remote: Compressing objects: 100% (15587/15587), done. > remote: Total 66179 (delta 46985), reused 65596 (delta 46402) > Receiving objects: 100% (66179/66179), 51.66 MiB | 667 KiB/s, done. > Resolving deltas: 100% (46985/46985), done. > warning: remote HEAD refers to nonexistent ref, unable to checkout. 

To fix the error, you’ll need to be an administrator of the repository on GitHub.com. You’ll want to change the default branch of the repository.

After that, you can get a list of all the available branches from the command line:

$ git branch -a # Lists ALL the branches > remotes/origin/awesome > remotes/origin/more-work > remotes/origin/new-main 

Then, you can just switch to your new branch:

$ git checkout new-main # Create and checkout a tracking branch > Branch new-main set up to track remote branch new-main from origin. > Switched to a new branch 'new-main' 

Saved searches

Use saved searches to filter your results more quickly

Cancel Create saved search

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

GitHub Community

Git: remote: Repository not found. #45993

ft-Basil asked this question in General
Feb 1, 2023 · 1 comments · 2 replies
Something went wrong.
Quote reply

>’s edit

<> deleted this content .>’s edit

Something went wrong.
Feb 1, 2023

Select Topic Area

Body

Hi,
I was trying to work with git from my vscode. Tried making a repo on github and tried to connect it through vscode, it throws error repo not found. I tried vice versa creating from vs code. repo was created but when i try to push it throws repo not found. I tried changed remote, renaming it, creating anther branch, tried making another repo, but the result is same!

Screenshot 2023-02-01 at 2 17 17 AM

when I tried on clicking the link on terminal, it directs me to correct repo!!

Screenshot 2023-02-01 at 2 20 52 AM

Beta Was this translation helpful? Give feedback.

4 You must be logged in to vote

All reactions

Hello and good day @ft-Basil issue could be due to the incorrect remote repository URL being used in Visual Studio Code. Run-> Git: Remotes

If the remote repository URL is incorrect, you can update it by opening the Command Palette and running the command Git: Add Remote. Enter a name for the remote and the correct repository URL, then run the command Git: Push to push the changes to the correct remote repository.

also check you credentials -> run Git: Credential Manager do they look correct?

GIT Push: ERROR Repository Not Found

GIT Push: ERROR Repository Not Found

GIT Push: ERROR Repository Not Found

Running into the following error when trying to push or pull a new repository for the first time with GIT. Here is what caused the issue for me.

C:\code\git\tutorials\isnotnulldev-cucumber-starter>git push --set-upstream origin main Enter passphrase for key '/c/Users/Michael/.ssh/isnotnulldev/id_ed25519': ERROR: Repository not found. fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. 

In my case, I thought it was something to do with the multi-account configuration but it turns out, it was way simpler than that. I had used .repo instead of .git for some silly reason.

Two ways to fix this, the short and long are below when using the SSH agent:

1) Get the URL from GitHub for your repo

2) Run the following command:

# Single account git remote add origin git@github.com:/.git # Multiple GitHub accounts using the alias in the .ssh/config file git remote add origin git@:/.git 

1) Go to the directory in which your project resides on the local laptop

2) In that directory, there will be a .git folder. Change into that directory.

3) Open up the config file. Take a look at the URL.

4) Copy the SSH URL from GitHub for your repo to the url field in the config file ( replacing github.com with your alias specified in .ssh//config if you are using multiple accounts) and save

Now, run the command again, it should pull/push correctly (or not in my case, but it succeeded):

This assumes that:

  • You’ve created an empty repo on GitHub already
  • You’ve set up your SSH private/public key pair.

    Check what your remote is set as:

 git remote -v 
 # Windows SET GIT_TRACE=1 # Bash export GIT_TRACE=1 # Turn it off by setting it to 0 

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *