Git prompting for username & password ever since .app URL change, no credentials work

My team and I have suddenly started encountering this problem just in the last couple of days for our sites that use Large Media. It seems like it started when the .app URL change went into effect.

Here’s the instance name for one of our main problem sites: beararchery-2020.netlify.app

When cloning, pulling, or pushing to/from GitHub, we’re continually getting this prompt:

Username for 'https://<id>.netlify.app':

No username/password combination we can think of works. I’m able to at least clone the repository by doing the following:

GIT_LFS_SKIP_SMUDGE=1 git clone <git-ssh-url>

Pushing & pulling afterward still results in the login prompt above.

I’m on macOS and don’t see anything in Keychain Access for the URL it’s prompting with. I do see a few that are <id>.netlify.com. However, none of them have an ID matching the one in the URL from the prompt, and changing them to end in .app doesn’t make any difference.

Other things I’ve tried:

  1. Redoing the process of connecting the site to the GitHub repo via the Netlify UI
  2. Running netlify plugins:install netlify-lm-plugin followed by netlify lm:install in the root of the repo after cloning it with GIT_LFS_SKIP_SMUDGE=1
    • This did result in the URL of the .lfsconfig file getting changed to the .netlify.app version. However, I still got the prompt upon trying to push the commit to change the file. I made the change directly on GitHub instead and then re-cloned the whole repo (since I couldn’t pull the change), but the problem still persists.
  3. Running netlify logout followed by netlify login (successfully logs me in, but problem persists)
  4. Restarting my machine (and waiting 45 minutes for updates to install :expressionless:)

I am logged into the Netlify CLI, and running netlify lm:info in the project root after all steps above gives me:

✔ Checking Git version [2.15.0]
✔ Checking Git LFS version [2.7.2]
✔ Checking Git LFS filters
✔ Checking Netlify's Git Credentials version [0.1.8]

Any help would be very much appreciated.

1 Like

hi there,

because of our recent domain change from .com to .app, it might be necessary for you to update the version of netlify credential helper.

can you try: netlify lm:install

and see it that fixes things?

1 Like

Hi, Perry. Thanks for the response. I have already tried this (#2 in “Other things I’ve tried” above), and it unfortunately did not seem to help at all.

1 Like

ah, I’m sorry I missed that. my bad.

OK, we’ll have to wait for our resident NLM/LFS expert to chime in on this one. Sorry about that. We’ll get back to you as soon as we can with more information.

Also having these same problems. Seems to be something directly with LFS.

hi there, we haven’t forgotten about this. We are still investigating this issue and will get back to you as soon as we’re able to. Thanks for your patience!

Thanks, Perry! Appreciate you all looking into it.

Hi, @tbaustin and @MastaAaron. In @MastaAaron’s case, the Netlify CLI’s Git Credentials version is out of date:

✔ Checking Netlify's Git Credentials version [0.1.8]

The current version is 0.1.9.

The upgrade process for this should be the following three commands:

npm i -g netlify-cli
netlify plugins:install netlify-lm-plugin
netlify lm:install

Once this is done, please log out (netlify logout), log back in (netlify login), and then check the Git Credentials helper version with:

netlify lm:info

If it says 0.1.9 would you then please try the clone again? If it still doesn’t work, please let us know.

1 Like

@luke – thanks a lot for chiming in!

Unfortunately, I’m still left with all the same versions after doing the steps you suggested.

I did try multiple times because I discovered I somehow had a package-lock.json, yarn.lock, and node_modules in my home directory (where I’m running all these commands from). Guess I did that accidentally at some point and never realized. :expressionless:

So I removed those and also took the opportunity to tell NVM to use a newer Node version (13.10.1) just in case.

Installing netlify-cli gave me version 2.47.0.
Installing netlify-lm-plugin gave me version 1.0.0.

Running netlify lm:install gave me the following:

✔ Checking Git version [2.15.0]
✔ Checking Git LFS version [2.7.2]
✔ Checking Git LFS filters
✔ Installing Netlify's Git Credential Helper for Mac OS X
✔ Configuring Git to use Netlify's Git Credential Helper

After running netlify logout, netlify login, and netlify lm:info, I still get:

✔ Checking Git version [2.15.0]
✔ Checking Git LFS version [2.7.2]
✔ Checking Git LFS filters
✔ Checking Netlify's Git Credentials version [0.1.8]

Hi, @MastaAaron, it may be that the existing shell is using the previous helper.

You should be able to load the new helper by opening a new terminal window or by running the command below in the existing session(s):

. ~/.netlify/helper/path.bash.inc

If that still doesn’t update the helper version, let us know and we’ll keep troubleshooting.

1 Like

@luke – This worked! After running what you suggested, I see version 0.1.9 for the helper. I’m assuming the upgrade has also worked for cloning our repo since I can see it starting to download the ~4GB of LFS files (:sweat_smile:).

Interestingly, however…It seems like this doesn’t “persist” between terminal sessions. I see version 0.1.8 every time I start a new terminal and have to run . ~/netlify/helper/path.bash.inc to get it to use the newer version.

I apologize if the issue isn’t Netlify-specific at this point…I suppose it shows a lack of Bash knowledge on my part.

Hi, @MastaAaron, that line should be added to .bashrc or .bash_profile.

. ~/netlify/helper/path.bash.inc

(Technically, it should be added to .bashrc but MacOS will allow you to use either one.)

That line is saying “load this file into to the current shell environment”. If you add it to .bashrc, it will be loaded automatically each time a new terminal sessions is created (meaning, each time a new window or tab is opened in a terminal app). If that is done, you won’t need to type it in anymore.

If there are other questions, we’re happy to answer so please reply anytime.

@luke, sorry for the delay in replying! What you suggested worked…once I made sure to include the . in .netlify. :wink:

Should also note that on OSX, adding that line to ~/.bashrc apparently does not work. I only got it to work after adding it to ~/.bash_profile.

Thanks again for all your help! Hopefully it will be useful to others who might have similar issues. Not sure which reply to mark as the solution, as several of them are part of it…

1 Like

This worked for me :smile:

2 Likes

Also sidenote sometimes you just have to run netlify link again. That did the job for me. Too Easy