Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I can`t Push the branch to <remote> , along with necessary commits and objects

Iam getting a result like this every time I try to push. i tried force push,rebase,init nothing worked.

nayananga@nayananga-Aspire-E5-575G:/opt/lampp/htdocs/registration$ git push 'https://[email protected]/group4suoj2016/version-1.0.git' 'nayananga`s_branch'
Password for 'https://[email protected]': 
Counting objects: 5, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (5/5), 1.02 KiB | 1.02 MiB/s, done.
Total 5 (delta 0), reused 0 (delta 0)
remote: 
remote: One of your commit messages is missing a valid issue key:
remote: 
remote:   3517c56: CompleteUserRegistrationUsingPhpAndMysqlDatabase
remote: 
remote: For more information, see https://confluence.atlassian.com/x/ZwjoE.
remote: 
To https://bitbucket.org/group4suoj2016/version-1.0.git
 ! [remote rejected] nayananga`s_branch -> nayananga`s_branch (pre-receive hook declined)
error: failed to push some refs to 'https://[email protected]/group4suoj2016/version-1.0.git'

any help?

nayananga@nayananga-Aspire-E5-575G:/opt/lampp/htdocs/registration$ git push origin 'nayananga`s_branch'
Password for 'https://[email protected]': 
Counting objects: 5, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (5/5), 1.02 KiB | 1.02 MiB/s, done.
Total 5 (delta 0), reused 0 (delta 0)
remote: 
remote: One of your commit messages is missing a valid issue key:
remote: 
remote:   3517c56: CompleteUserRegistrationUsingPhpAndMysqlDatabase
remote: 
remote: For more information, see https://confluence.atlassian.com/x/ZwjoE.
remote: 
To https://bitbucket.org/group4suoj2016/version-1.0.git
 ! [remote rejected] nayananga`s_branch -> nayananga`s_branch (pre-receive hook declined)
error: failed to push some refs to 'https://[email protected]/group4suoj2016/version-1.0.git'

@tim

nayananga@nayananga-Aspire-E5-575G:/opt/lampp/htdocs/registration$ git push origin master
Password for 'https://[email protected]': 
Counting objects: 5, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (5/5), 1.02 KiB | 1.02 MiB/s, done.
Total 5 (delta 0), reused 0 (delta 0)
remote: 
remote: One of your commit messages is missing a valid issue key:
remote: 
remote:   6cfab63: CompleteUserRegistrationUsingPhpAndMysqlDatabase
remote: 
remote: For more information, see https://confluence.atlassian.com/x/ZwjoE.
remote: 
To https://bitbucket.org/group4suoj2016/version-1.0.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://[email protected]/group4suoj2016/version-1.0.git'

@R

like image 800
Nayananga Muhandiram Avatar asked Sep 03 '18 15:09

Nayananga Muhandiram


People also ask

How do I push commits to a remote branch?

To push the commit from the local repo to your remote repositories, run git push -u remote-name branch-name where remote-name is the nickname the local repo uses for the remote repositories and branch-name is the name of the branch to push to the repository. You only have to use the -u option the first time you push.

How do I force a branch to push on GitHub?

To force a push to only one branch, use a + in front of the refspec to push (e.g git push origin +master to force a push to the master branch). See the <refspec>... section above for details. Force an update only if the tip of the remote-tracking ref has been integrated locally.

Why do you fail to push some refs?

When collaborating with other developers using Git, you might encounter the error: failed to push some refs to [remote repo] error. This error mainly occurs when you attempt to push your local changes to GitHub while the local repository (repo) has not yet been updated with any changes made in the remote repo.

Can you push a branch without commits?

No, you must make a commit before you can push. What is being pushed is the commit (or commits).


1 Answers

After spending a lot of time on this I was able to find the solution.I'll post the solution here

We are receiving reports that some customers are receiving "pre-receive hook declined" errors when attempting to push. We are investigating. If you are experiencing this issue, there is a workaround. As a repository admin, you can go to the repository settings -> "Links" section. Then disable "Require issue keys in commit messages". Posted about 2 months ago. Jul 09, 2018 - 10:52 UTC https://status.bitbucket.org/incidents/j71s01py6mb6

hope it will help others

like image 105
Nayananga Muhandiram Avatar answered Nov 15 '22 03:11

Nayananga Muhandiram