this is my repository https://github.com/kiotie32/artbit-text.git when I do
$ git push -u origin master
remote: Repository not found.
fatal: repository 'https://github.com/kiotie32/arbit-text.git/' not found
I am on a Windows 10 machine. I had configured ssh keys to be used with this laptop. I do an ls and I can see
MINGW64 ~/.ssh
$ ls
kiotie32_rsa kiotie32_rsa.pub known_hosts
I read all the answers given on this thread I changed the password stored in windows credential manager.
I check git remote -v | head -n1 | awk '{print $2}' | sed 's/.*\///' | sed 's/\.git//'
I get following output arbit-text
I changed the password stored in windows credentials manager probably an old password was stored.
I do not get any popup asking username password. (an ssh key was configured but not sure if that is working on this Windows 10 environment I have the key stored in .ssh in git bash) Now I do
$ git remote add origin https://github.com/kiotie32/arbit-text.git
fatal: remote origin already exists.
then I do
$ git push -u origin master
error: src refspec master does not match any
error: failed to push some refs to 'https://github.com/kotie32/arbit-text.git'
So I am not able to understand why this error is coming/
I tried the solution here https://stackoverflow.com/a/7572252/13012032 first answer to do
git commit -m "initial master"
and then I got
$ git push origin master remote: Repository not found. fatal: repository 'github.com/kotie32/arbit-text.git' not found
then I tried as in comments
git add -all
and then I did
$ git push origin master remote: Repository not found. fatal: repository 'https://github.com/kotie32/arbit-text.git/' not found
then from another answer https://stackoverflow.com/a/4183856/13012032 I tried
$ git show-ref
79d1730e9aa78f68a11ec4de6a0e8d6b66f17afb refs/heads/master
then I did
$ git push origin HEAD:master
remote: Repository not found.
fatal: repository 'https://github.com/kotie32/arbit-text.git/' not found
I notice in the last error on above url spelling kotie32 is wrong it should be
kiotie32
checkd the config file inside the .git folder
and there I see the following
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
ignorecase = true
[remote "origin"]
url = https://github.com/kiotie32/arbit-text.git
fetch = +refs/heads/*:refs/remotes/origin/*
so here url is corrrect the spelling is kiotie32
which is correct.
ok I now noticed that 2 directories have formed.
project folder/.git/.git
and config file of <project folder>/.git
has wrong url
and the inner one i.e. <project folder>/.git/.git
has correct url.
I changed the config file of <project folder>/.git
and deleted subdirectory .git/.git
the new config file has
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
ignorecase = true
[remote "origin"]
url = https://github.com/kiotie32/arbit-text.git
fetch = +refs/heads/*:refs/remotes/origin/*
and then I again do
$ git push -u origin master
remote: Repository not found.
fatal: repository 'https://github.com/kiotie32/arbit-text.git/' not found
then I did
$ git remote set-url origin https://github.com/kiotie32/artbit-text.git
then now I am able to push to master branch.