Closed feoh closed 11 years ago
Hi, thanks for the report! I currently catch a very broad range of Git errors when initing the repos and would like to improve this so github-mirror can complain about problems earlier. I think this might be a permissions problem when initing, but it just doesn't crash until trying to fetch.
Can you please give me the output of:
$ cd /mnt/ebs/apps/github-mirror/pcp_middleware.git/ && ls -al && cat config
Also, please go to https://github.com/settings/applications and delete the personal API token that was included in the output you pasted - it can be used as password to your account.
Done and done. Thanks so much for the quick response!
cpatti@ip-10-242-247-224:/apps/github-mirror$ cd /mnt/ebs/apps/github-mirror/pcp_middleware.git/ && ls -al && cat config
total 20
drwxr-xr-x 7 root root 111 2013-07-10 20:03 .
drwxr-xr-x 55 root root 4096 2013-07-10 20:03 ..
drwxr-xr-x 2 root root 6 2013-07-10 20:03 branches
-rw-r--r-- 1 root root 185 2013-07-10 20:03 config
-rw-r--r-- 1 root root 73 2013-07-10 20:03 description
-rw-r--r-- 1 root root 23 2013-07-10 20:03 HEAD
drwxr-xr-x 2 root root 4096 2013-07-10 20:03 hooks
drwxr-xr-x 2 root root 20 2013-07-10 20:03 info
drwxr-xr-x 4 root root 28 2013-07-10 20:03 objects
drwxr-xr-x 4 root root 29 2013-07-10 20:03 refs
[core]
repositoryformatversion = 0
filemode = true
bare = true
[remote "origin"]
url = git@github.com:secondrotation/pcp_middleware.git
fetch = +refs/heads/*:refs/remotes/origin/*
cpatti@ip-10-242-247-224:/mnt/ebs/apps/github-mirror/pcp_middleware.git$
One other thing that MIGHT be worthy of note - the native code compile section of the pip install failed, and pip said it was using the native Python versions. I have no idea if that's important here but thought it bore mentioning anyway.
Sorry for the late reply here, I haven't had time to look at this until now. I've published a new version to pypi, 0.3.5, that fixes a lot of problems by using raw git commands instead of the GitPython library's wrappers.
Can you please try installing that and let me know if you still get this issue? Thanks!
One thing to note is that I had to delete pip's build directory in /tmp/pip* to make it upgrade to 0.3.5. Another way to do it is:
$ pip install --upgrade --build=/tmp/not-pips-default-dir githubmirror==0.3.5
Hey there, thanks so much for the response! I got much farther this time, it syncs all our repositories except for a repo that we use to archive old projects:
root@ip-10-242-247-224:/mnt/ebs/apps/github-mirror# github-mirror sync secondrotation
Fetching git@github.com:secondrotation/pcp_middleware.git in /mnt/ebs/apps/github-mirror/pcp_middleware.git...
Fetching git@github.com:secondrotation/sr_middleware.git in /mnt/ebs/apps/github-mirror/sr_middleware.git...
Fetching git@github.com:secondrotation/channel_advisor.git in /mnt/ebs/apps/github-mirror/channel_advisor.git...
Fetching git@github.com:secondrotation/reporting_area.git in /mnt/ebs/apps/github-mirror/reporting_area.git...
Fetching git@github.com:secondrotation/pcp.git in /mnt/ebs/apps/github-mirror/pcp.git...
Fetching git@github.com:secondrotation/rack_middleware.git in /mnt/ebs/apps/github-mirror/rack_middleware.git...
Fetching git@github.com:secondrotation/health_checks.git in /mnt/ebs/apps/github-mirror/health_checks.git...
Fetching git@github.com:secondrotation/cms.git in /mnt/ebs/apps/github-mirror/cms.git...
Fetching git@github.com:secondrotation/useragent.git in /mnt/ebs/apps/github-mirror/useragent.git...
Fetching git@github.com:secondrotation/pimp.git in /mnt/ebs/apps/github-mirror/pimp.git...
Fetching git@github.com:secondrotation/mc.git in /mnt/ebs/apps/github-mirror/mc.git...
Fetching git@github.com:secondrotation/srbase.git in /mnt/ebs/apps/github-mirror/srbase.git...
Fetching git@github.com:secondrotation/masterdev.git in /mnt/ebs/apps/github-mirror/masterdev.git...
Fetching git@github.com:secondrotation/hoptoad_notifier.git in /mnt/ebs/apps/github-mirror/hoptoad_notifier.git...
Fetching git@github.com:secondrotation/rack_page_caching.git in /mnt/ebs/apps/github-mirror/rack_page_caching.git...
Fetching git@github.com:secondrotation/delayed_job_extras.git in /mnt/ebs/apps/github-mirror/delayed_job_extras.git...
Fetching git@github.com:secondrotation/g3.git in /mnt/ebs/apps/github-mirror/g3.git...
Fetching git@github.com:secondrotation/warp_drive.git in /mnt/ebs/apps/github-mirror/warp_drive.git...
Fetching git@github.com:secondrotation/rack_url_stripper.git in /mnt/ebs/apps/github-mirror/rack_url_stripper.git...
Fetching git@github.com:secondrotation/cachetastic.git in /mnt/ebs/apps/github-mirror/cachetastic.git...
Fetching git@github.com:secondrotation/is_paranoid.git in /mnt/ebs/apps/github-mirror/is_paranoid.git...
Fetching git@github.com:secondrotation/giza.git in /mnt/ebs/apps/github-mirror/giza.git...
Fetching git@github.com:secondrotation/srapi.git in /mnt/ebs/apps/github-mirror/srapi.git...
Fetching git@github.com:secondrotation/srgems.git in /mnt/ebs/apps/github-mirror/srgems.git...
Fetching git@github.com:secondrotation/gazelle_ldap.git in /mnt/ebs/apps/github-mirror/gazelle_ldap.git...
Fetching git@github.com:secondrotation/ic.git in /mnt/ebs/apps/github-mirror/ic.git...
Fetching git@github.com:secondrotation/boi.git in /mnt/ebs/apps/github-mirror/boi.git...
Fetching git@github.com:secondrotation/cmo.git in /mnt/ebs/apps/github-mirror/cmo.git...
Fetching git@github.com:secondrotation/smx.git in /mnt/ebs/apps/github-mirror/smx.git...
Fetching git@github.com:secondrotation/active_shipping.git in /mnt/ebs/apps/github-mirror/active_shipping.git...
Fetching git@github.com:secondrotation/bootstrap.git in /mnt/ebs/apps/github-mirror/bootstrap.git...
Fetching git@github.com:secondrotation/erp.git in /mnt/ebs/apps/github-mirror/erp.git...
Fetching git@github.com:secondrotation/sales.git in /mnt/ebs/apps/github-mirror/sales.git...
Fetching git@github.com:secondrotation/activemessaging.git in /mnt/ebs/apps/github-mirror/activemessaging.git...
Fetching git@github.com:secondrotation/gzpuppet.git in /mnt/ebs/apps/github-mirror/gzpuppet.git...
Fetching git@github.com:secondrotation/archive.git in /mnt/ebs/apps/github-mirror/archive.git...
Traceback (most recent call last):
File "/usr/local/bin/github-mirror", line 9, in <module>
load_entry_point('githubmirror==0.3.5', 'console_scripts', 'github-mirror')()
File "/usr/local/lib/python2.6/dist-packages/githubmirror/__init__.py", line 40, in cmd
main.fetch(repos, workdir)
File "/usr/local/lib/python2.6/dist-packages/githubmirror/main.py", line 88, in fetch
gitdir.git.fetch(REMOTE_NAME)
File "/usr/local/lib/python2.6/dist-packages/git/cmd.py", line 227, in <lambda>
return lambda *args, **kwargs: self._call_process(name, *args, **kwargs)
File "/usr/local/lib/python2.6/dist-packages/git/cmd.py", line 456, in _call_process
return self.execute(call, **_kwargs)
File "/usr/local/lib/python2.6/dist-packages/git/cmd.py", line 377, in execute
raise GitCommandError(command, status, stderr_value)
git.exc.GitCommandError: 'git fetch origin' returned exit status 128: ERROR: Repository not found.
fatal: The remote end hung up unexpectedly
Here's the output of that debug command you asked for last time in case it's helpful:
root@ip-10-242-247-224:/mnt/ebs/apps/github-mirror# cd /mnt/ebs/apps/github-mirror/archive.git/ && ls -al && cat config
total 20
drwxr-xr-x 7 root root 128 2013-07-23 15:08 .
drwxr-xr-x 56 root root 4096 2013-07-23 15:06 ..
drwxr-xr-x 2 root root 6 2013-07-23 15:06 branches
-rw-r--r-- 1 root root 172 2013-07-23 15:08 config
-rw-r--r-- 1 root root 73 2013-07-23 15:06 description
-rw-r--r-- 1 root root 0 2013-07-23 15:08 FETCH_HEAD
-rw-r--r-- 1 root root 23 2013-07-23 15:06 HEAD
drwxr-xr-x 2 root root 4096 2013-07-23 15:06 hooks
drwxr-xr-x 2 root root 20 2013-07-23 15:06 info
drwxr-xr-x 4 root root 28 2013-07-23 15:06 objects
drwxr-xr-x 4 root root 29 2013-07-23 15:06 refs
[core]
repositoryformatversion = 0
filemode = true
bare = true
[remote "origin"]
url = git@github.com:secondrotation/archive.git
fetch = +refs/*:refs/*
mirror = true
root@ip-10-242-247-224:/mnt/ebs/apps/github-mirror/archive.git#
Note that as the dumping ground for where old projects go to die, we'd be more than happy to skip this if it were possible to do so.
I thought maybe removing the archive.git subdir would accomplish this, but it didn't work.
Any thoughts on how I might just skip it if a fix is problematic? Thanks for all your help.
I ran into something like this, too. The problem was that the user that was running github-mirror didn't have access to a repo, but the user that created the API token did. We have a machine user that clones from Github, but I had generated the API token on my personal account. Since I am an admin I could see more repos than the machine user could.
Are you able to clone the repo when logged in as the user that is running github-mirror? If not, try changing the token in the .githubmirror
file to be one belonging to the same Github user.
Works perfectly, thank you sir!
Here's what I'm seeing:
This is on an Ubuntu 10.04.1 LTS system running Python 2.6.5