berkeley-dsep-infra / data100-19s

1 stars 3 forks source link

git-sync did not set user.email, user.name #39

Open ryanlovett opened 5 years ago

ryanlovett commented 5 years ago

A user reported in piazza that git-sync didn't import hw1 and posted a screenshot. It pointed to user.email and user.email not being set in ~/sp19/.git/config. I manually ran in ~/sp19/:

git config user.email nbgitpuller@example.com
git config user.name nbgitpuller

and visited /user/{username}/git-sync... and it completed successfully. I'm not sure why nbgitpuller wouldn't have initialized the repo completely.

ryanlovett commented 5 years ago

From their server logs:

[I 2019-01-23 20:42:02.874 SingleUserLabApp log:158] 200 GET /user/{username}/git-pull?repo=https%3A%2F%2Fgithub.com%2FDS-100%2Fsp19&subPath=hw%2Fhw1%2Fhw1.ipynb&redirects=1 ({username}@10.244.1.1) 31.43ms
[I 2019-01-23 20:42:04.916 SingleUserLabApp handlers:34] $ git fetch
[I 2019-01-23 20:42:04.917 SingleUserLabApp handlers:34] From https://github.com/DS-100/sp19
[I 2019-01-23 20:42:04.917 SingleUserLabApp handlers:34]    fb0829b..a7f48bf  gh-pages   -> origin/gh-pages
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/srv/conda/envs/data100/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/srv/conda/envs/data100/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "/srv/conda/envs/data100/lib/python3.6/site-packages/nbgitpuller/handlers.py", line 73, in pull
    raise e
  File "/srv/conda/envs/data100/lib/python3.6/site-packages/nbgitpuller/handlers.py", line 67, in pull
    for line in gp.pull():
  File "/srv/conda/envs/data100/lib/python3.6/site-packages/nbgitpuller/pull.py", line 59, in pull
    yield from self.update()
  File "/srv/conda/envs/data100/lib/python3.6/site-packages/nbgitpuller/pull.py", line 186, in update
    yield from execute_cmd(['git', 'commit', '-am', 'WIP', '--allow-empty'], cwd=self.repo_dir)
  File "/srv/conda/envs/data100/lib/python3.6/site-packages/nbgitpuller/pull.py", line 41, in execute_cmd
    raise subprocess.CalledProcessError(ret, cmd)
subprocess.CalledProcessError: Command '['git', 'commit', '-am', 'WIP', '--allow-empty']' returned non-zero exit status 128.

[I 2019-01-23 20:42:05.419 SingleUserLabApp handlers:34] $ git commit -am WIP --allow-empty
[I 2019-01-23 20:42:05.419 SingleUserLabApp handlers:34] 
[I 2019-01-23 20:42:05.420 SingleUserLabApp handlers:34] *** Please tell me who you are.
[I 2019-01-23 20:42:05.420 SingleUserLabApp handlers:34] 
[I 2019-01-23 20:42:05.421 SingleUserLabApp handlers:34] Run
[I 2019-01-23 20:42:05.421 SingleUserLabApp handlers:34] 
[I 2019-01-23 20:42:05.421 SingleUserLabApp handlers:34]   git config --global user.email "you@example.com"
[I 2019-01-23 20:42:05.421 SingleUserLabApp handlers:34]   git config --global user.name "Your Name"
[I 2019-01-23 20:42:05.422 SingleUserLabApp handlers:34] 
ryanlovett commented 5 years ago

This hit a second user.