Recently I stumbled upon that kind of error when trying to update a submodule:
git submodule update –remote –merge
fatal: unable to access ‘https://github.com/DaveGamble/cJSON.git/’: Received HTTP code 407 from proxy after CONNECT
Turns out that it was the proxy authentification not being sent correctly.
In our case we are using system defined proxy, so we do not need git’s ones
Solved by using:
git config –global http.proxyAuthMethod ‘basic’ git config –global –unset http.proxy git config –global –unset https.proxy
Some also encountered SSL verification problems due to auto signed certificate use in their network, and had to disable SSL verification. It’ done with the following command, but we do not recommend to use it unless really needed:
git config –global http.sslVerify false
If ever you have to remove a commit from a pushed pull request, here is a simple way to do it. Bonus: it’s not adding a commit for the removal.
First be sure to be on the good branch
git checkout target-pull-request-branch
Then have a watch at the PRs commit tab and note the commits hash you want to remove (one or more)
Replace X by that number in the following command, which will make and interactive rebase for the X last commits
git rebase -i HEAD~X
You are now going to have an interactive text view, in which all the aimed commits are preceded by the word ‘pick’
Using the view like a text editor, replace the ‘pick’ word by ‘drop’ on the lines containing the targeted commit’s hashes .
Replaced pick with drop for commits 4aa3149 and 2031a79b:
Save and exit
In my case vim was the default text editor, so here you go escape colon w q
Push force the rebased repository
git push --force
This will remove the targeted commits and the only trace will be in the PR comments. The commit page will look like the rebased one, without the discarded commits nor a mention to them.
When enabling SAST in a gitlab project you can have that kind of error at the tests part:
The yaml provided is not containing the needed part: