2
我试图使用gitpython模块向上推新的git仓库。下面是我做的步骤,并得到一个错误128gitpython返回'git push --porcelain origin'返回退出代码128
# Initialize a local git repo
init_repo = Repo.init(gitlocalrepodir+"%s" %(gitinitrepo))
# Add a file to this new local git repo
init_repo.index.add([filename])
# Initial commit
init_repo.index.commit('Initial Commit - %s' %(timestr))
# Create remote
init_repo.create_remote('origin', giturl+gitinitrepo+'.git')
# Push upstream (Origin)
init_repo.remotes.origin.push()
当执行推(),gitpython抛出一个异常:
'git push --porcelain origin' returned with exit code 128
访问github上是通过SSH。
你看到我在做什么不对吗?