Replace repo_init() with repo_open()
Added gitlib error checking to repo_create()