simonthum / git-sync

Safe and simple one-script git synchronization
773 stars 99 forks source link

could not read Username for 'https://github.com': Device not configured #17

Closed linonetwo closed 4 years ago

linonetwo commented 4 years ago

Have you encounter this err before?

# TiddlyWiki ErrorsSync failed

From https://github.com/linonetwo/Meme-of-LinOnetwo
 * branch            master     -> FETCH_HEAD
fatal: could not read Username for 'https://github.com': Device not configured
Sync failed
git-sync: Preparing. Repo in .git /Users/linonetwo/Desktop/repo/Meme-of-LinOnetwo
git-sync: Mode sync
git-sync: Using origin/master
git-sync: Fetching from origin/master
git-sync: Pushing changes...
git-sync: git push returned non-zero. Likely a connection failure.

From https://github.com/linonetwo/Meme-of-LinOnetwo
 * branch            master     -> FETCH_HEAD
fatal: could not read Username for 'https://github.com': Device not configured

When commit using sudo

Screen Shot 2020-04-20 at 6 55 55 PM

Sudo because this is a start-up task, monitor by https://github.com/coreybutler/node-mac

simonthum commented 4 years ago

Hi, this seems to be a problem with your git setup. Try it manually, and track it down from there.

I do not use OSX personally, but maybe this helps:

https://github.com/kemayo/sublime-text-git/issues/176

cjholowatyj commented 4 years ago

Hi @linonetwo, I vaguely recall getting a similar error from git on my server (git-sync needs to be given a username and email address to record as the author of commits git-sync creates). I'm on BitBucket, not GitHub, but I imagine the premise is similar to the following article: Configure your DVCS username for commits

linonetwo commented 4 years ago

My problem actually comes from the sudo, when I run it without administrator privilege, this won't happen again.

Thank you for your solutions! But I find it tricky to config git for administrator account... So I managed to make my script run as normal user.