Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't push to repo anymore? #35

Open
danchristian opened this issue Mar 16, 2019 · 11 comments
Open

Can't push to repo anymore? #35

danchristian opened this issue Mar 16, 2019 · 11 comments

Comments

@danchristian
Copy link

danchristian commented Mar 16, 2019

After following the Netlify instructions I now can't push changes to my repo. I get the following error in my terminal:

git: 'credential-' is not a git command. See 'git --help'.

Did you mean this?
        credential
git: 'credential-netlify' is not a git command. See 'git --help'.
git: 'credential-' is not a git command. See 'git --help'.

Did you mean this?
        credential
git: 'credential-netlify' is not a git command. See 'git --help'.
Username for 'https://XXXX.netlify.com': ^C
Exiting because of "interrupt" signal.
Remote "origin" does not support the LFS locking API. Consider disabling it with:
  $ git config lfs.https://XXXX.netlify.com/.netlify/large-media.locksverify false

With git config -l I then get:

filter.lfs.clean=git-lfs clean -- %f
filter.lfs.smudge=git-lfs smudge -- %f
filter.lfs.process=git-lfs filter-process
filter.lfs.required=true
user.name=Dan
user.email=XXXX@XXXX
push.default=simple
credential.helper=osxkeychain
credential.httpusepath=true
core.trustctime=false
core.autocrlf=input
include.path=/Users/Dan/.netlify/helper/git-config
credential.helper=
credential.helper=netlify
credential.helper=osxkeychain
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
core.ignorecase=true
core.precomposeunicode=true
submodule.active=.
remote.origin.url=https://github.com/XXXX/XXXX-nuxt.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.master.remote=origin
branch.master.merge=refs/heads/master
lfs.https://XXXX.netlify.com/.netlify/large-media.access=basic

How can I fix this? Thanks

@calavera
Copy link
Contributor

It looks like the credential helper is not in your path.
We need some extra information to trace this problem:

  1. Can you post the content of /Users/Dan/.netlify/helper/git-config ?
  2. Can you check the contents of /Users/Dan/.netlify/helper/bin with ls -la /Users/Dan/.netlify/helper/bin ?
  3. Can you post the content of $PATH to check that /Users/Dan/.netlify/helper/bin is there?

@danchristian
Copy link
Author

Thanks for the help. Not 100% sure how, but managed to get the credential-netlify error to go away. I ran through the netlify lm:setup process again and there was some code it produced that I needed to copy/paste in that I think I missed first time.

I still get the git: 'credential-' is not a git command. See 'git --help'. errors though. I'm not entirely sure what the error is saying, any help getting it back to normal would be great.

# The first line resets the list of helpers so we can check Netlify's first.
[credential]
  helper = ""

[credential]
  helper = netlify

git-credential-netlify

Screenshot 2019-03-19 at 08 36 23

@kalwalt
Copy link

kalwalt commented Jun 4, 2019

@danchristian did you solved the issue? i have a similar one here: netlify/netlify-lm-plugin#25

@KhanMaytok
Copy link

KhanMaytok commented Sep 7, 2019

I created a clone of the file in bin folder from git-credential-netlify to credential-netlify and works

@bugii
Copy link

bugii commented Sep 22, 2019

For me, a simple reboot fixed the issue (on windows), so i guess it is something related to path variables only being affected after reboot on windows or so.

@lundie
Copy link

lundie commented Mar 11, 2020

I was able to get it working by running the following commands:
brew tap netlify/git-credential-netlify
brew install git-credential-netlify

@russellgordon
Copy link

@lundie 's comments worked for me. I have a vague notion that something changed in GitHub's authorization requirements recently. I know Xcode's GitHub integration had to be updated recently. And now installation of git-credential-netlify (or updating of same, if you already had it as I did) seems to resolve this problem.

@jeremyzilar
Copy link

@lundie's comments worked for me as well. Thanks!

@grynn-in
Copy link

grynn-in commented Sep 5, 2020

brew tap netlify/git-credential-netlify
brew install git-credential-netlify

are those the same set of commands in Windows? Thank you so much!

@lailahgrant
Copy link

I have a solution that has worked for me [Windows user].

a) Remember that option of manually generating a NETLIFY CLI ACCESS TOKEN in the documentation, yes -https://docs.netlify.com/cli/get-started/ at the part of #config.json location - note down that path for windows users C:\Users\Lailah\AppData\Roaming\netlify\Config\config.json

b) on that very netlify documentation link, go to #Obtain a token in the Netlify UI
Go on and generate it, Copy that token and paste it somewhere for use later like on a note pad.

c) Now you have over 2 important notes
i) NETLIFY_AUTH_TOKEN - t678894rgfgfkfhdflkvmjndfsgvhb generated token
ii) C:\Users\Lailah\AppData\Roaming\netlify\Config\config.json

Set up your environment variable.
This PC > properties > Advanced System Settings > in the Advanced tab - go to > Environment Variable
👍 in the User variable, click New > Variable Name : NETLIFY_AUTH_TOKEN Variable Value : t678894rgfgfkfhdflkvmjndfsgvhb
then click OK.

👍 in the System variable, select the path > click Edit > then New > paste in the C:\Users\Lailah\AppData\Roaming\netlify\Config\config.json > click OK.

REcommend your Restart your machine.

I have uploaded an image about this last most crucial step.
After restarting, go to your local project terminal, try git push - it will fail, Error Invalid username and password
git netlify after adding environment variable

Now start netlify using netlify login
After logging in, run 'git push` - Uploading LFS objects

This has worked for me 💯

git netlify after adding environment variable

@wgrzr
Copy link

wgrzr commented Apr 28, 2021

@lailahgrant's works for windows users, I didn't even have to do the last part

I'm sure there's a choco version of @lundie's but if you're here your paths are probably all over the place anyway so I'd look into it lol

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests