brew search generates mail notification "You recently used a password to access an endpoint through the GitHub API using Homebrew/2.2.2" I got a mail from GitHub:


  You recently used a password to access an endpoint through the GitHub
  API using Homebrew/2.2.2 (Macintosh; Intel Mac OS X 10.15.2)
  curl/7.64.1. We will deprecate basic authentication using password to
  this endpoint soon:
  
  https://api.github.com/search/code?q=user%3AHomebrew+path%3AFormula+path%3ACasks+path%3A.+filename%3Abusybox+extension%3Arb&amp;per_page=100
  
  We recommend using a personal access token (PAT) with the appropriate
  scope to access this endpoint instead. Visit
  https://github.com/settings/tokens for more information.
  
  Thanks, The GitHub Team


The mail came after I searched for formula:

~ brew search test
Warning: Cask 'sqleo' is unreadable: undefined method `method_missing_message' for Utils:Module
Warning: Cask 'squirrelsql' is unreadable: undefined method `method_missing_message' for Utils:Module
Warning: Cask 'yiddish-klal' is unreadable: undefined method `method_missing_message' for Utils:Module
==&gt; Formulae
cpptest                      cxxtest                      memtester                    phoronix-test-suite          slowhttptest                 testdisk                     unittest                     vttest
cpputest                     git-test                     minetest                     shelltestrunner              speedtest-cli                testssl                      unittest-cpp

==&gt; Casks
aja-system-test                                colortester                                    emacs-pretest                                  nsregextester                                  sqlitestudio
clementine-latest                              eclipse-testing                                latest                                         socket-io-tester                               synology-note-station-client


Always a prompt like this pops up:



It look like I have some kind of misconfiguration? I don't like that brew uses my GitHub credentials.
I don't like that brew uses my GitHub credentials.


Brew is not using your GitHub credentials, you are.

Brew is just an exceptionally advanced scripting engine that allows you to download and build from source software that’s found on GitHub, Sourceforge, et al.  It’s important to note that you’re not downloading from Brew, but a Brew is automating your download of the software.

What steps did you take to save git keys in your shell environment?

You would reverse that to have brew not be granted access to your keys when it calls git or makes web / API calls. 


https://help.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh