scraperwiki / code-scraper-in-browser-tool

Just like on ScraperWiki Classic; now a part of QuickCode.
https://quickcode.io
Other
38 stars 8 forks source link

Has various git and status error messages on premium.scraperwiki.com #92

Closed drj11 closed 11 years ago

drj11 commented 11 years ago

(pretty sure this is a bug in premium not this tool, but I'm not sure what's going on yet).

For example, switch into the datahub of drj11 (me) and create a new Code in Your Browser tool (choose Python, obv, but it doens't matter), and press run. you get an error:

Unknown new status! *** Please tell me who you are. Run git config --global user.email "you@example.com" 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: empty ident name (for ) not allowed running
drj11 commented 11 years ago

(morty will have a field day)

I think it might be git versions. free.scraperwiki.com, where this works, has:

$ git --version
git version 1.7.9.5

premium.scraperwiki.com, where this does not work, has:

$ git --version
git version 1.8.1.2

I continue to investigate.

drj11 commented 11 years ago

It is the change in git versions.

In git version 1.8 you have to set all 4 of:

GIT_COMMITTER_EMAIL
GIT_COMMITTER_NAME
GIT_AUTHOR_EMAIL
GIT_AUTHOR_NAME

or you can set:

git config --global user.email "you@example.com"
git config --global user.name "Your Name"
drj11 commented 11 years ago

The following patch may be of interest

diff --git a/http/code.js b/http/code.js
index 07129a9..7c7542d 100644
--- a/http/code.js
+++ b/http/code.js
@@ -270,7 +270,7 @@ var enrunerate_and_poll_output = function(action) {
   action = action || ""
   command = "./tool/enrunerate " + action
   if (action == "run") {
-    command = "(export GIT_AUTHOR_NAME='Anonymous'; cd code; git init; git add scraper; git commit -am 'Ran code in browser') >/dev/null; " + command
+    command = "(git config --global user.email $(whoami); git config --global user.name Anon; cd code; git init; git add scraper; git commit -am 'Ran code in browser') >/dev/null; " + command
   }

   scraperwiki.exec(command, function(text) {
frabcus commented 11 years ago

This is a notable case where a virtualenv wouldn't have helped. Versioning the whole chroot very much would have though!