

The last thing I did was: ! cd ~/Dev/repo_copy I simply would check it out and then do git push -force local_remote HEAD. So for any local branch I had whose git log didn't end in. So I started instead with an empty repository, and then pushing branches to it worked OK.

repo_copy and then using that as a local remote resulted in the following error: ! git push -force local_remote HEADįatal: failed to read object e0a9dffddeeca96dbaa275636f8e8f5d4866e0ed: Invalid argumentĮrror: failed to push some refs to '/Users/steve/Dev/repo_copy' Unfortunately, cloning the repository into. Why isn't this possible?Īt any rate I stumbled across this cool strategy to push a branch to another local Git repository. Theoretically, since this is a local repository, I feel that Git should be able to recover/repair itself using origin. I don't care too much about repairing my repository, except I have a few local branches that were too experimental to bother pushing to the remote repository, and I'd like to salvage the work in those branches. So the corrupted commit was deep in the history. PS: Alternatively, you could choose to use ssh-based login, using a passphrase-protected ssh private key, which would be more secure and less convenient, but it is outside the scope of this answer.For me, I had enabled TRIM in OS X with a non-Apple SSD (which is not recommended) and apparently caused various corruptions on my boot disk. CAVEAT: keep in mind that, if you happen to also use another git account(s) without 2FA on this machine, those real password(s) will also be stored in plaintext. So it is as secure as using a ssh private key a passphrase-less ssh private key. But in this 2FA case, the credential is NOT your real password, it is a randomly generated string.
#GITKRAKEN REPOSITORY CLONE NO MATCH GITHUB PASSWORD#
Url = can persist your password by run this for one time only:Īnd then your future git password(s) will be stored in ~/.git-credentials, in plaintext, using the format password(s) in plaintext would normally be considered as a security risk. git/config to modify the url line into the following format: You can persist your user name by including it into your project remote url. Use this access token as your password in the command line. As of late 2016, you need to generate an access token from your Personal access tokens page.

His answer is largely right, it is just that Github changes that setting page. Password for Invalid username or password. 'current' instead of 'simple' if you sometimes use older versions of Git) (the 'simple' mode was introduced in Git 1.7.11. See 'git help config' and search for 'fault' for further information. To squelch this message and adopt the new behavior now, use: To squelch this messageĪnd maintain the current behavior after the default changes, use: Warning: fault is unset its implicit value is changing in In particular, when switching from https to ssh, the ssh key givesįatal: Could not read from remote repository. I tried many of the solutions here: Git push requires username and password but that didn't work. I just enabled 2FA (I can't think of any other changes I made) and git asked for my username and password.
