title: error: failed to push some refs to 'https://github.com/
body: <p>this is my repository
  <a href="https://github.com/kiotie32/artbit-text.git" rel="noreferrer">https://github.com/kiotie32/artbit-text.git</a>
  when I do </p>
  
  <pre><code>$ git push -u origin master
  remote: Repository not found.
  fatal: repository 'https://github.com/kiotie32/arbit-text.git/' not found
  </code></pre>
  
  <p>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</p>
  
  <pre><code> MINGW64 ~/.ssh
  $ ls
  kiotie32_rsa  kiotie32_rsa.pub  known_hosts
  </code></pre>
  
  <p>I read all the answers given on <a href="https://stackoverflow.com/questions/25337199/remote-repository-not-found-fatal-not-found">this thread</a> 
  I changed the password stored in windows credential manager.</p>
  
  <p>I check <code>git remote -v | head -n1 | awk '{print $2}' | sed 's/.*\///' | sed 's/\.git//'</code>
  I get following output <code>arbit-text</code></p>
  
  <p>I changed the password stored in windows credentials manager probably an old password was stored.</p>
  
  <p>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 </p>
  
  <pre><code>$ git remote add origin https://github.com/kiotie32/arbit-text.git
  fatal: remote origin already exists.
  </code></pre>
  
  <p>then I do </p>
  
  <pre><code>$ 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'
  </code></pre>
  
  <p>So I am not able to understand why this error is coming/</p>
  
  <p>I tried the solution here <a href="https://stackoverflow.com/a/7572252/13012032">https://stackoverflow.com/a/7572252/13012032</a> first answer to do<br>
   <code>git commit -m "initial master"</code><br>
  and then I got<br>
  <code>$ git push origin master remote: Repository not found. fatal: repository 'github.com/kotie32/arbit-text.git' not found</code><br>
  then I tried as in comments<br>
  <code>git add -all</code>   and then I did<br>
   <code>$ git push origin master remote: Repository not found. fatal: repository 'https://github.com/kotie32/arbit-text.git/' not found</code>  </p>
  
  <p>then from another answer <a href="https://stackoverflow.com/a/4183856/13012032">https://stackoverflow.com/a/4183856/13012032</a> I tried<br>
  <code>$ git show-ref
  79d1730e9aa78f68a11ec4de6a0e8d6b66f17afb refs/heads/master</code><br>
  then I did<br>
  <code>$ git push origin HEAD:master
  remote: Repository not found.
  fatal: repository 'https://github.com/kotie32/arbit-text.git/' not found</code></p>
  
  <p>I  notice in the last error on above url spelling kotie32 is wrong it should be 
  <code>kiotie32</code> 
  checkd the config file inside the .git folder
  and there I see the following</p>
  
  <pre><code>[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/*
  </code></pre>
  
  <p>so here url is corrrect the spelling is <code>kiotie32</code> which is correct.</p>
  
  <p>ok I now noticed that 2 directories have formed.
  <code>project folder/.git/.git</code>
  and config file of <code>&lt;project folder&gt;/.git</code> has wrong url
  and the inner one i.e. <code>&lt;project folder&gt;/.git/.git</code> has correct url.</p>
  
  <p>I changed the config file of <code>&lt;project folder&gt;/.git</code> and deleted subdirectory <code>.git/.git</code>
  the new config file has </p>
  
  <pre><code>[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/*
  </code></pre>
  
  <p>and then I again do</p>
  
  <pre><code>$ git push -u origin master
  remote: Repository not found.
  fatal: repository 'https://github.com/kiotie32/arbit-text.git/' not found
  </code></pre>
  
  <p>then I did </p>
  
  <pre><code>$ git remote set-url origin https://github.com/kiotie32/artbit-text.git
  </code></pre>
  
  <p>then now I am able to push to master branch.</p>