Tag Archives: git push

Git push submit error 403, processing method

How is 618 sales champion made?Uncover the secret of e-commerce’s “invigorating” hundreds of millions of sales data>>>

Today, after creating the GIT warehouse, I tried to pull the warehouse with sourcetree. After creating a branch, I submitted the new branch code according to the normal operation, but the following error was reported:

Pushing to https://github.com/J-Boos/J-Boss-Tool.git
remote: You must verify your email address.
remote: See https://github.com/settings/emails.
fatal: unable to access ‘ https://github.com/J-Boos/J-Boss-Tool.git/ ‘: the requested URL returned error: 403

after some trouble, we found the root of the problem, The reason is that the. Git/config file has no account and password when the warehouse is created. You just need to add the account and password to the config file<
specific steps:
first, find the. Git folder. If it’s MAC, you need to press Shift + Command +. Three buttons in the project file to see the hidden file
the second step is to find the config file in the GIT folder and find the orange domain name in the following code

[remote “origin”]
url = https://github.com/J-Boss-Os/J-Boss-Tool.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch “master”]

Third, replace the domain name with the account @ password and save it
[remote “origin”]
url = HTTPS:// account @ password/j-boss-os/j-boss-tool. Git
fetch = + refs/heads/*: refs/remote/origin/*
[branch “master”]
url = HTTPS:// account @ password/j-boss-os/j-boss-tool

After saving and closing the editor, re git push, you will find that 403 error will not be reported again

Git push error![rejected] master -> master(non-fast-forward) error:failed to push some refs to…

 

A project is created locally and a warehouse is created on GitHub. To link the local warehouse to the remote warehouse, I use the following method:
git init   initialize the local warehouse
git remote add origin XXX add the remote warehouse address
if you execute
git add – a after that,
Git commit – M ”
git push origin master, then this problem will appear (rejected), so after remote add, don’t worry about git add, be sure to git pull origin master, the reason for this is that you have readme files in the warehouse created by code cloud, but not locally, which causes local and remote out of sync,

Then there are two solutions:
Method 1:
if there is no local readme file, a local readme file will be generated

Git pull — rebase origin master local generation of readme files
git push origin master

Method 2:
then I will force the upload to cover the remote file,
git push – f origin master

Git Push Github ERROR: Permission to xxx.git denied to user

Before, my computer’s local git has logged into a GitHub account. Today, I want to change another new GitHub account to submit the project, which is equivalent to using two GitHub accounts on the same computer

So I changed my user name and email first

1 git config --global user.name "Your_username"
2 git config --global user.email "Your_email"

Then create a new warehouse on GitHub, connect with the local warehouse, and finally use git push – U origin master to push to the remote warehouse

User linliquan does not have access to user monkeylucky’s repository javainterview

Finally, a solution is found by searching for information on the Internet

My computer is win7, but the setting method should be almost the same

1. Open the control panel and search the credential manager on the right. You will find that there are in GitHub account

2. Change your user name and password to your new login GitHub account and password 2

re submit: git push – U origin master

It’s done

Solution: git uses git push to jump out of remote: permission to a denied to B

I started git uploading the project. Unexpectedly, an error occurred in the git push step?

remote: Permission to qwe2193066947/firstRepository.git denied to murenziwei.

fatal: unable to access’https://github.com/qwe2193066947/firstRepository.git/’: The requested URL returned error: 403

Nani! what happened? ! Can’t find the file?

This error translates into Chinese roughly: user murenziwei does not have permission to access the firstRepository of user qwe2193066947.

In other words, in the terminal of the git environment, I logged in with the murenziwei account, so I should change to the qwe2193066947 account to solve the problem.

So, immediately execute the relevant git command line to log in to the github account

1
2
git config --global user.name xxx
git config --global user.email xxx@xxx

However, if you don’t even see the steps to enter the password, it can be considered as a successful account switch? Obviously, after this failure, one can only find another solution through online information.

Since I am using an ASUS desktop, the operation may be different, but the principles are similar.

Control Panel-->User

 

After editing the account, go back to the terminal and enter git push again. If nothing else, your family will be able to call your family, and the problem should be solved.

 

After hell-like training, the power of heaven was created. Fingers that shed blood, pop the world’s swan song!

 

[Solved] Git push Error: ! [remote rejected] master -> master (pre-receive hook declined)

Git push solution:[ remote rejected] master -> master (pre-receive hook declined)

The day before yesterday, I was going to back out a version and push it to the remote branch, but I tried many times and couldn’t upload it. The error is as follows:

! [ remote rejected] master -> master (pre-receive hook declined)

Screenshot:

1. Turn off the protected permission of the branch where the content to be pushed is located

(1) Enter the settings of your project

(2) Click protected branches and unprotected to change the authority of the master branch, that is, to turn off the protected authority of the master

2. Create a new branch, push the project to the new branch, and merge later

(1) New branch

git branch name

(2) Switch branches

git checkout name

(3) Upload project

git add .

git commit -m "commit message"

git remote add origin remote repository address git push -u origin branch name

Git push Updates were rejected because the tip of your current branch is behind

git push Error Updates were rejected because the tip of your current branch is behind

DannideMacBook-Pro:connect-cas2-client danni$ git push origin master
To https://gitee.com/danni3/connect-cas2-client.git
 ! [rejected]        master -> master (non-fast-forward)
error: failed to push some refs to 'https://gitee.com/danni3/connect-cas2-client.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

Solution: git pull origin master

DannideMacBook-Pro:connect-cas2-client danni$ git pull origin master
From https://gitee.com/danni3/connect-cas2-client
 * branch            master     -> FETCH_HEAD
fatal: refusing to merge unrelated histories

git pull origin master—allow-unrelated-histories