Setting up atom on a brand new machine but don't have git install locally throws error.
*** Please tell me who you are.
Run
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
to set your account's default identity.
Omit --global to set the identity only in this repository.
fatal: unable to auto-detect email address (got 'atomuser@WIN-VU79AHTD4PV.(none)')
'git' is not recognized as an internal or external command,
operable program or batch file.
Expected behavior:
[What did you expect to happen?]
We should probably allow the user to enter their global email and user name from atom /cc @simurai as I'm not sure how this should look like but I know for github for vs, it does this.
If we ask the user to run commands on cmd/terminal, we should provide a link on how to get git especially on windows since it isn't installed by default.
Actual behavior:
[What actually happened instead?]
Get an Error on atom and a error on console o a completely clean machine.
Reproduces how often:
[What percentage of the time does this happen?]
100%
You can get this information from copy and pasting the output of atom --version and apm --version from the command line. Also, please include the OS and what version of the OS you're running.
Windows 7 x64 bit Ultimate
Atom : 1.18.0
Electron: 1.3.15
Chrome : 52.0.2743.82
Node : 6.5.0
+10. typing in git username and password beach time I push a commit is an extra step I'd like to skip, if possible.
Is there any workaround for this on Windows?
@klapperkopp for the issue of setting your username and email, you can set it in terminal/powershell/cmd:
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
For the unrelated comment from @macmanes(that is a different issue), you can get around typing in your username/password if you use ssh instead of http.
@ungb This doesn't work, it will always say, that git is not recognised... is there a way to do it without installing git on the windows machine?
I found the git executable was installed in the Windows user directory, buried here: AppData\Local\atom\app-1.18.0\resources\app\node_modules\dugite\git\mingw64\bin (note this is for 64-bit and 1.18). I was able to run the commands there to resolve the error without a full install of git.
@Akxe you can also set your git info in the .gitconfig file.
On windows this is usually located in your Users folder.
Example: If your username was Bob, your .gitconfig should be in:
C:\Users\Bob\.gitconfig
If this file doesn't exist, you need to create it and fill it out as followed:
[user]
name = <NAME>
email = <EMAIL>
(fill in the name and email part and save)
I believe @Teknost suggestion would work as well but I have not tried it myself.
See https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup for more info.
Glad I found this issue because I was really struggling.
I've setup Github, paid my sub, downloaded and installed the latest Atom and.... now what?
I read http://flight-manual.atom.io/using-atom/sections/github-package/#initialize-repositories but there's a missing link, or a lot of assumed knowledge.
Thanks to this issue, I figured out the following OK:
cd C:UsersjonskiAppDataLocalatomapp-1.20.0-beta7resourcesappnode_modulesdugitegitmingw64bin
git.exe config --global user.email "[email protected]"
git.exe config --global user.name "Your Name"
But, unless I've missed a doc somewhere... how do I link it to my Github repo? Could do with some newbie help here, please. I'm OK once pointed in the right direction, it's just that there's a signpost missing!
Glad this issue helped you setup your username and email with Git @talkingnews :+1:
But, unless I've missed a doc somewhere... how do I link it to my Github repo? Could do with some newbie help here, please. I'm OK once pointed in the right direction, it's just that there's a signpost missing!
Just to keep this issue on topic, feel free to ask in our official message board:
You can ping me in the post so I get a notification (my username is the same on Discuss) and hopefully I can help point you in the right direction. If you can clarify in your post what you mean by "link it to my Github repo", that'll be helpful too (e.g. do you mean for Git operations or do you mean the GitHub tab which let's you browse pull requests in your repository?).
oh please i am not getting out of this error... any help... any clear steps please...
+10 still no way to set it permanently? Issue exists on Linux as well
@harikrishnaactiva - @ungb provided steps above; if you have Git installed on your computer you can set your user.email and user.name with Git directly: https://github.com/atom/github/issues/932#issuecomment-316519369. If you don't have Git installed, you can manually create a .gitconfig file: https://github.com/atom/github/issues/932#issuecomment-317802161. If you still have trouble, feel free to reach out on the message board: https://discuss.atom.io/.
@BNolet - since this issue is still open, it hasn't been resolved so you can't set this information through the GitHub package. The workarounds described above will set your user.name and user.email however.
Thanks to this issue, i found an existing gitconfig file at
C:\Users\username\AppData\Local\atom\app-1.33.1\resources\app.asar.unpacked\node_modules\dugite\git\mingw64\etc
There i added the lines
[user]
name = "username"
email = "email"
@BNolet this seems to fix the problem permanently.
If you are using atom, then you need to open the .git file inside the project repo name/.git. When it has been opened in any editor, type the following after any other configs already there:
[user]
git --config global user.email "your email in double quotes"
git --config global user.name "your user name for repo in double quotes"
Glad I found this issue because I was really struggling.
I've setup Github, paid my sub, downloaded and installed the latest Atom and.... now what?
I read http://flight-manual.atom.io/using-atom/sections/github-package/#initialize-repositories but there's a missing link, or a lot of assumed knowledge.
Thanks to this issue, I figured out the following OK:
cd C:UsersjonskiAppDataLocalatomapp-1.20.0-beta7resourcesappnode_modulesdugitegitmingw64bin
git.exe config --global user.email "[email protected]"
git.exe config --global user.name "Your Name"But, unless I've missed a doc somewhere... how do I link it to my Github repo? Could do with some newbie help here, please. I'm OK once pointed in the right direction, it's just that there's a signpost missing!
This is helpful. I don't have Atom installed. so the path in my pc is:
C:UsersXXXAppDataLocalGitHubDesktopapp-2.1.3resourcesappgitmingw64bin
run from cmd:
1: cd C:UsersXXXAppDataLocalGitHubDesktopapp-2.1.3resourcesappgitmingw64bin
2: git.exe config --global user.email "[email protected]"
3: git.exe config --global user.name "Your Name"
It might pop up an error saying: could not lock config file C:SPB_Data.gitconfig: No such file or directory
Just go to c: and create a new folder SPB_Data. Run step 2 again, and it will generate .gitconfig within the folder.
Run step 3 will add the "name" into the same .gitconfig.
It might work if you just create a new folder SPB_Data under C drive and change the setting on File->options->git from gitdestop GUI. Mine didn't allow me to save new name and email address because no such folder were found. I din't try it. Just speculating.
Hope this is helpful.
If you are using atom, then you need to open the .git file inside the project repo name/.git. When it has been opened in any editor, type the following after any other configs already there:
[user]
git --config global user.email "your email in double quotes"
git --config global user.name "your user name for repo in double quotes"
Thank you, its really helpful.
I have git installed globally via cywgin but Atom doesn't recognize that i've set up all that.
SO no setting it globally doesn't help, still get the error only in atom
Turns out i fixed it with installing git on windows and registering outside atom in git terminal on same machine. For linux and OsX then the same- need instlled git and doing theese commands its asking.
I found the git executable was installed in the Windows user directory, buried here:
AppData\Local\atom\app-1.18.0\resources\app\node_modules\dugite\git\mingw64\bin(note this is for 64-bit and 1.18). I was able to run the commands there to resolve the error without a full install of git.
atom version 1.49
there is no dugite directory after node_modules is there any other folder by other name
AppDataLocalatomapp-1.49.0resourcesapp>
Update : mine got solved after i installed gitbash . had to install GB only to config the username and email
Fixed my problem via @ungb method
My setup environment : Win10 64-bit / Atom 1.51.0 / Fresh Installation no git
Just create a .gitconfig file @ 'C:UsersXXX'
problem solved, able to commit without a pop.
Thanks !
@Akxe you can also set your git info in the .gitconfig file.
On windows this is usually located in your Users folder.
Example: If your username was
Bob, your.gitconfigshould be in:
C:\Users\Bob\.gitconfigIf this file doesn't exist, you need to create it and fill it out as followed:
[user] name = <NAME> email = <EMAIL>(fill in the name and email part and save)
I believe @Teknost suggestion would work as well but I have not tried it myself.
See https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup for more info.
The following should solve the problem without installing any git:
@klapperkopp for the issue of setting your username and email, you can set it in terminal/powershell/cmd:
git config --global user.email "[email protected]" git config --global user.name "Your Name"For the unrelated comment from @macmanes(that is a different issue), you can get around typing in your username/password if you use ssh instead of http.
Hi, that worked for me, thanks a lot! However, I didn麓t know where to type that code in initially. Turned out I need to use Git Bash (type Git Bash in the search bar). Just for anyone else who might be struggling with that.
Most helpful comment
@Akxe you can also set your git info in the .gitconfig file.
On windows this is usually located in your Users folder.
Example: If your username was
Bob, your.gitconfigshould be in:C:\Users\Bob\.gitconfigIf this file doesn't exist, you need to create it and fill it out as followed:
(fill in the name and email part and save)
I believe @Teknost suggestion would work as well but I have not tried it myself.
See https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup for more info.