avatarTeri Radichel

Free AI web copilot to create summaries, insights and extended knowledge, download it at here

1756

Abstract

te">m</span>=<span class="hljs-string">"Some message"</span> git commit -m <span class="hljs-variable">m</span></pre></div><p id="fa49">Instead of this:</p><div id="3542"><pre><span class="hljs-attribute">m</span><span class="hljs-operator">=</span><span class="hljs-string">"Some message"</span> git commit -m <span class="hljs-string">"m"</span></pre></div><p id="26aa">I wish git would fix this error to something that makes more sense.</p><div id="f45c" class="link-block"> <a href="https://readmedium.com/thoughtful-error-handling-ca1064cda8da"> <div> <div> <h2>Thoughtful Error Handling</h2> <div><h3>Your error handler is one of your most important security defenses</h3></div> <div><p>medium.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/1*hWOdEC85WwPVAPmT9JlrBA.png)"></div> </div> </div> </a> </div><p id="ab1b">This error message is similar to another which has a different solution — I think! It’s hard to believe those quotes above caused the problem. So try this if you are still having problems.</p><div id="4f58" class="link-block"> <a href="https://readmedium.com/error-src-refspec-master-does-not-match-any-71b0e0750e38"> <div> <div> <h2>error: src refspec master does not match any.</h2> <div><h3>Similar to a prior git error when trying to push files but not exactly</h3></div> <div><p>medium.com</p></div> </div> <div> <div style="background-image: url(https://miro.readme

Options

dium.com/v2/resize:fit:320/1*4oxP4LXk8l8c3mpRvO7ejg.png)"></div> </div> </div> </a> </div><p id="a78f">Follow for updates.</p><p id="4a3a">Teri Radichel | <i>© <a href="https://2ndsightlab.com/?source=post_page---------------------------">2nd Sight Lab</a> 2023</i></p><div id="8b5f"><pre><span class="hljs-section">About Teri Radichel:

⭐️ Author: Cybersecurity Books
⭐️ Presentations: Presentations by Teri Radichel
⭐️ Recognition: SANS Award, AWS Security Hero, IANS Faculty
⭐️ Certifications: SANS ~ GSE 240
⭐️ Education: BA Business, Master of Software Engineering, Master of Infosec
⭐️ Company: Penetration Tests, Assessments, Phone Consulting ~ 2nd Sight Lab</pre></div><div id="caae"><pre><span class="hljs-section">Need Help With Cybersecurity, Cloud, or Application Security?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</span>
🔒 Request a penetration test or security assessment
🔒 Schedule a consulting call
🔒 Cybersecurity Speaker for Presentation</pre></div><div id="cfd3"><pre>Follow <span class="hljs-keyword">for</span> more stories like <span class="hljs-keyword">this</span>:

❤️ Sign Up my Medium Email List ❤️ Twitter: <span class="hljs-meta">@teriradichel</span> ❤️ LinkedIn: https:<span class="hljs-comment">//www.linkedin.com/in/teriradichel</span> ❤️ Mastodon: <span class="hljs-meta">@teriradichel</span><span class="hljs-meta">@infosec</span>.exchange ❤️ Facebook: 2nd Sight Lab ❤️ YouTube: @2ndsightlab</pre></div><figure id="550c"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*4oxP4LXk8l8c3mpRvO7ejg.png"><figcaption></figcaption></figure></article></body>

pathspec ‘repository’ did not match any file(s) known to git

Nonsense git error message based on the actual problem

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

⚙️ Check out my series on Automating Cybersecurity Metrics | Code.

🔒 Related Stories: Bugs | AWS Security | Secure Code

💻 Free Content on Jobs in Cybersecurity | ✉️ Sign up for the Email List

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I was writing a script to create a new github repository when I got this message:

pathspec ‘repository’ did not match any file(s) known to git

I started testing the lines of code one by one until I figured out the problem was with the line of code where I was trying to commit a ReadMe file to the new repo.

This error message doesn’t make any sense based on the problem that caused it. The problem was that I had a message for git add with spaces in it that I did not put in quotes. Spent way too long on this non-sensical error message.

In other words I had this:

m="Some message"
git commit -m $m

Instead of this:

m="Some message"
git commit -m "$m"

I wish git would fix this error to something that makes more sense.

This error message is similar to another which has a different solution — I think! It’s hard to believe those quotes above caused the problem. So try this if you are still having problems.

Follow for updates.

Teri Radichel | © 2nd Sight Lab 2023

About Teri Radichel:
~~~~~~~~~~~~~~~~~~~~
⭐️ Author: Cybersecurity Books
⭐️ Presentations: Presentations by Teri Radichel
⭐️ Recognition: SANS Award, AWS Security Hero, IANS Faculty
⭐️ Certifications: SANS ~ GSE 240
⭐️ Education: BA Business, Master of Software Engineering, Master of Infosec
⭐️ Company: Penetration Tests, Assessments, Phone Consulting ~ 2nd Sight Lab
Need Help With Cybersecurity, Cloud, or Application Security?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
🔒 Request a penetration test or security assessment
🔒 Schedule a consulting call
🔒 Cybersecurity Speaker for Presentation
Follow for more stories like this:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
❤️ Sign Up my Medium Email List
❤️ Twitter: @teriradichel
❤️ LinkedIn: https://www.linkedin.com/in/teriradichel
❤️ Mastodon: @teriradichel@infosec.exchange
❤️ Facebook: 2nd Sight Lab
❤️ YouTube: @2ndsightlab
Error Message
Git
Pathspec
Repository
Files
Recommended from ReadMedium