2016-06-21 168 views
0

我有一个shell脚本运行在Jenkins框中,我通过HTTP克隆我的存储库并试图通过HTTP将一些更改推送到已存在的远程分支。GIT-无法推送到远程存储库

但是我一直收到未能推倒参考文献错误,并加入--verbose并没有真正告诉我为什么错误正在发生。我不相信这是用户权限问题,因为我用来克隆存储库的用户在我们的内部gitlab仓库中拥有主权限。

+ git status 
On branch npm_publish 
Your branch is ahead of 'origin/npm_publish' by 1 commit. 
    (use "git push" to publish your local commits) 
nothing to commit, working directory clean 

//Grepping the remote branches to make sure npm_publish is there 
+ grep npm_publish 
+ git branch -a 
* npm_publish 
    remotes/origin/npm_publish 
+ git pull 
Already up-to-date. 
+ git push -u origin npm_publish --verbose 
Pushing to https://<username>:<password>[email protected]<internal repository>/quality/test.git 
error: failed to push some refs to 'https://<username>:<password>[email protected]<internal repository>/quality/test.git' 

UPDATE: 所以这一步之前,我推,如果我做

rm -r node_modules 

它推就好了之前做一个

npm install 
npm install grunt-cli 

。为什么要安装npm模块

+0

您可以尝试使用'git pull'before从远程更新您的回购推送。看起来你的回购没有达到tp date – Flows

+0

@Flows它没有任何区别。我用git pull语句输出更新了我的问题 – user3626708

回答

相关问题