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。
你看到我在做什麼不對嗎?