Sorry Mojave question about SDK and upgrade

I try and do brew upgrade and i get an Error, I have to tupe this because You cant log in to your site in mojave safari. At least I couldn’t

Error: The Command line header tools package must be installed on Mojave.

Of course I have installed Xcode 10 and the command line tools and this package. but brew will not recognize this.
Sorry for the Mojave question

Same question is here:

MacOS Mojave is just broken in this regard.