Unexpected HTTP status code: 403 (-1) Xcode - ios

I have this error when I push my code to Github repository by Xcode

Before answering the question you must know:
Although everyone can make a pull request, you can't just push to a repository. ِِYou need permission.
So this happened for me because in my Xcode, I was pushing to a remote that belonged to one of the other members ie I didn't have permission to push to.
You have two options:
Ask for permission from the owner of that remote repo/fork and have them include into one of its collaborators
Or Simply push to a repo that you have permission like your own repo,
using the dropdown menu encircled below (and perhaps then make a pull request from there to that branch you wanted to push to)
I usually run into this issue when I checkout directly from a remote branch ie I do something like:
git checkout -b localFromUpstream upstream/someBranch
And then when I commit, Xcode assumes that I want to push back to upstream/someBranch. But I don't permission to push to upstream/someBranch.

HTTP code 403 means forbidden, so it is most probably incorrect credentials. So double check your username and password etc.
https://en.wikipedia.org/wiki/HTTP_403

Even you can make a pull request, but can't just push to a repository. ِِYou need permission.
Inviting collaborators to a personal repository
Ask for the username of the person you're inviting as a collaborator. If they don't have a username yet, they can sign up for GitHub.
On GitHub, navigate to the main page of the repository.
Under your repository name, click Settings.
In the left sidebar, click Collaborators.
Under "Collaborators", start typing the collaborator's username.
Select the collaborator's username from the drop-down menu.
Click Add collaborator.
The user will receive an email inviting them to the repository. Once they accept your invitation, they will have collaborator access to your repository.

Related

How to push to bitbucket using jgit

I am trying to push code to bitbucket using jgit. Clone is working with ssh, but to push - I need to set credentials and I am getting "not authorized " error. I tried username, password, ("Private-token", access-token) and app password also
While pushing after a successful clone, ii am getting "origin not found" error also
Please advise
"Not authorized" might mean that you don't have permissions to push to the specified branch. E.g. there might be a policy to not allow to push directly into main branch. Usually developers should push to feature branches and then submit pull requests to ask for code review before merging to the main branch.
As for "origin not found" please check the remotes. The default name for remote repository is origin, but you might have it differently. Also it might be an issue with the command parameters. Please provide more details.

SourceTree, Error Logon failed, use ctrl+c to cancel basic credential prompt

I'm getting below error while cloning a repo through Sourcetree.
I'm able to login directly through bitbucket.org but not through Sourcetree. Let me know how this issue needs to be fixed.
SourceTree version: 3.3.9
TIA
Let's try this:
Tools -> Options -> Authentication
Click "Edit" on Your Account
Click "Refresh OAuth Token"
It works for me :)
I found out that the reason why SourceTree cannot authorize our GitHub account is that source tree is using the old git version so that it doesn't authorize our account through web but through its own application which is not permitted by Git.
Git Notification
Solution:
First of all, you must know where your SourceTree stores your local datas (which is also the local git). You go to Tools > Options. Choose Git tab, and then choose Embeded in Git version which will tell you the path to their local datas. Mine is "C:\Users\as\AppData\Local\Atlassian".
Git Local path
And then you need to delete all the folder in the Atlassian and then uninstall SourceTree.
After all, you install new version of Git from this: https://gitforwindows.org/ and install new SourceTree from this: https://www.sourcetreeapp.com/
And then you just need to open your repository from the Add button, and try to push again.
SourceTree
They will appear the web-authorization for you to sign in. And after all that, it works.
Git Authentication
Authenticate with OAuth instead of Basic.
Tools/Options/Authentication, delete your github account, add again. Works for me.
Tools> Options> Authentication> Edit already existing account - Enter password and save again. This might refresh your password in your SourceTree
This is still relevant!
I solve it by updating SourceeTree.
Remove Sourcetree from PC
Download the new version from the official site: click
After open, on the top right corner press the yellow flag to update, then click "restart".
Go to Tools => Settings => GIT => Update Embedded.
For version 3.4.0 I have Embedded v2.29.2.
Then press Fetch, for example. Select "Use no helper" in a popup window. Also, check "don't ask again". Enter email/login and password into the login popup.
Success for me :)
I had this exact issue. I opened the project in Visual Studio 2019 and attempted the same request as before. This prompted me for the same username and password, but also allowed me to authorize using the website. I selected this and was able to go back into SourceTree and continue the clone.

TFS 2015 Can not Complete Pull Request

I am setting up Pull Request in TFS 2015 GIT Repo. My Users are able to Create Pull Request however I am the only one that is able to Complete a pull request. I have confirmed that all the Users have Contribute to the entire repo. I am at a loss as to what is going on. Once the User Approves the PR and Clicks Complete Pull Request the Button is disabled but it never starts the Merge Process. If the User refreshes the page the Complete Pull Request Button is active again. All of this works fine for me just not any of my other users so I assume it is a permissions issue but can not find it.
In TFS, you could complete your pull request after the reviewers approve of the changes by selecting Complete in the upper right of the pull request view.
Complete button on the pull request view with its drop-down options
After you selected the complete button, it will complete the pull request now and merge the changes to the target branch.
For permissions, you just need to grant Contribute permission of target branch (Pull Request: source branch into target branch) to the corresponding user.
Double check the permission settings, if they are added in some group deny the corresponding permission. In TFS, Deny trumps Allow.
Also make sure your pull request have met all branch policy before the completion.
Pull requests can be completed if the number of required approvals is met, even if other reviewers have rejected the changes.

Unable to Authenticate my Bitbucket server account with Sourcetree / How to register in source tree with Bitbucket Server credentials

I have a Bitbucket repository, which I'm able to logging in web browser with my credentials, Now I want to checkout it in Sourcetree, So I've installed Sourcetree 2.6.10, It requires authentication to Bitbucket server with Root URL & Username to continue, I'm providing input in below format...
Root URL : https://bitbucket.xxxxxxx.com
Username : xxxxxx.xxxxxx
The error i'm getting is...
Failed to check login for user [xxxxx.xxxxxx]. You do not have permission to access URL ‘https://bitbucket.xxxxxxxxx.com/rest/api/1.0/users/xxxxxx.xxxxxx’ please check the user credentials associated with this account. The request returned with status code ‘Unauthorized’.
Any help would be appreciated, thanks !
To fix:
1-go to source tree window, clicked remote
2-little gear icon, clicked "settings"
3-double clicked on Bitbucket server, changed protocol from default HTTPS to SSH
To Perforce, Now, I m sharing another solution whether if the user prefers, BitBucket Cloud intergrated with SourceTree,(facing the above stated issue),
Since one of the steps of the upgrade process was to input your Atlassian account password, you should now have a password set (in addition to being able to use Google). You should be able to use your Bitbucket username and Atlassian account password to authenticate SourceTree.
If you need to reset your Atlassian account password, you can do so here: https://id.atlassian.com/login/resetpassword
Source : https://community.atlassian.com/t5/Bitbucket-questions/Cannot-login-with-Bitbucket-in-SourceTree-after-linking-with/qaq-p/145231
I had a similar problem trying to register Sourcetree the first time I opened it, using my company's Bitbucket Server URL. Turns out I just needed to include https:// at the beginning of the URL.
Drop everything after ".com" and log in there.
e.g. log into
https://bitbucket.xxxxxxx.com
not
‘https://bitbucket.xxxxxxxxx.com/rest/api/1.0/users/xxxxxx.xxxxxx’
see also
https://jira.atlassian.com/browse/SRCTREEWIN-8743

Didn't get Gerrit review email

I am using Gerrit2.4.2. My account is an administrator, also in Reviewer and Verifier groups(I created these two groups manually).
In All-Projects, I allow Reviewer group to review /ref/* and Verifier to submit /ref/*.
See my diagram below:
We have a project named as appengine. Also have a group called 'appengine team'. This group has two memebers: another developer and me.
Now another developer added a test file and pushed it to HEAD:refs/for/master. But I didn't get any email notification. After he logged into the Gerrit web site and found his change issue.
And added my email manually, I could see the email notification and also could see the change issue in web site.
My project's settings look like so:
Gerrit doesn't send email notifications when a change is uploaded, unless you are watching that project (Settings->Watched Projects). You will also get an email notification if somebody adds you as a reviewer to a change.
My current way is to use one parameter for receive-pack command. I added to my .git/config file:
[remote "review"]
pushurl = ssh://username#IP:29418/myproject.git
push = HEAD:refs/for/master
receivepack = git receive-pack --reviewer csfreebird
Each time a developer uses git push review, I get an email.
Not perfect, Gerrit server should take the responsibility.

Resources