I'm using a github Mac client to manage my repo and for sent pull requests to the repo I forked. In the last few days, I can't send pull requests, I only recieve this error:
error: The requested URL returned error: 403 while accessing
https://github.com/pyrocms/pyrocms.git/info/refs
fatal: HTTP request failed
I have also tried to set SSH instead of HTTPS, but doing this, the Mac client can't contact the server... How can I fix this?
This is the project I need.
I need to update my git version.
Thanks to all!
Related
Recently I have been added as a contributor to a program allowing me to make some changes but I can't git push my fixed code to the repo.
The error is as follows:
remote: Permission denied to myusername.
fatal: unable to access 'program URL': The requested URL returned error: 403
I can create a pull request to modify the file but my instructor said it would be troublesome if he had to check the request and merge them every time so he added me as a contributor.
I googled my question and some said I need to add my SSH key to my instructor's account, but does it mean I have permissions to all repo of my instructor?
I'm just a beginner in github, many thanks for your help!
You need to have an SSH key for your own account (not your instructor's). If he added you as a contributor and you cloned the repository via SSH (as it seems you did), Github will check your personal SSH key to identify you whenever you try to push.
Just follow these steps to add your SSH key to your account: https://docs.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account
I have my personal GitHub account which has been given access to Repos that exist as part of an organization. I'm trying to create a pull-request from within VSCode for these Repos, but I get the below error.
Is there a setting I'm just missing?
[Info] GitHubRepository> Creating pull requests failed: HttpError: Validation Failed: {"resource":"PullRequest","field":"head","code":"invalid"}
HttpError
Check first if you have a git config credential.helper set (to, for instance on windows, manager-core)
If you have, that means the wrong credentials (username/password) are cached in said credential helper. They are not the ones for your organization GitHub account.
See GitHub "Caching your GitHub credentials in Git" and update them.
I am running a script which clones multiple repositories in my GitHub project organization. After running the script twice or thrice, I get an 128 error
git -c core.fsyncobjectfiles=0 ls-remote ssh://git#github.com/project-xyz/abc.git failed with exit code 128
and this works again after some time. I am guessing that this is a rate limiting issue.
Github page says ratelimit for unauthenticated requests is 60 per hour and I guess I am hitting that by running my script multiple times. My ssh key is added to Github.
I was under the assumption that cloning git repos using ssh are considered authenticated requests. My error leads me to believe that those are treated as unauthenticated requests.
I want to know what are differences between authenticated and unauthenticated requests in GitHub?
First, check the SSH access with:
ssh -Tv git#github.com
And fix the URL: it should be
ssh://git#github.com/project-xyz/abc.git
# not
ssh://git#wwwgithub.com/project-xyz/abc.git
Second, the rate limiting is for API calls (Example: curl -i https://api.github.com/users/octocat)
I suppose any kind of direct Git call to GitHub would be limited, authenticated or not.
I want to fetch a file from a github repository and read it from my application using http request url.
I tried using the below http url.,
Example:
https://raw.github.xxx.com/sample-repo/config-details/master/conf/application-dev.conf?token=ABAD5JUZ7O84U7CIKEU4MGY5UWJU6
It worked well, but after a week the token got expired. So I am getting "404: Not found" when I try to fetch the file.
Is there any way to prevent the token from expiring or any better solution to solve this problem?
Update:
Actually I am trying to implement a remote config server in play framework.
I am using play-rconf-http (a library which helps to fetch a config file hosted in a http server)
I will set the remote file url in my app's config file as below,
remote-configuration.http.url = "https://raw.github.xxx.com/sample-repo/config-details/master/conf/application-dev.conf?token=ABAD5JUZ7O84U7CIKEU4MGY5UWJU6"
So while my server starts it will fetch the file from the remote server and load the configuration.
It was working as I expected, but after few days the tokens are getting expired. So I need to solve it.
I have setup a build process in VSTS that is pulling source code from a public facing SVN url. It works great when I manually queue the build from the dashboard or if I schedule a build to run at a certain time. However, when a build gets queued by continuous integration it throws the following exception:
An exception occurred while polling the repository. Error: Microsoft.TeamFoundation.Build2.Server.Extensions.BuildPollingException: Unable to connect to a repository at URL '<Path to the URL I am referencing>' --->
SharpSvn.SvnRepositoryIOForbiddenException: Unable to connect to a repository at URL '<Path to the URL I am referencing>' --->
SharpSvn.SvnRepositoryIOForbiddenException: Access to '<Path to the trunk of the repository>' forbidden
When I look at the event log on the server that Subversion lives on, it shows that the build agent is trying to access the URL with an anonymous login, hence the exception I am seeing.
Has anyone ran into this before? I know I have configured the service endpoint correctly with user credentials since it works when I manually fire off or schedule queue the build. I've done pretty extensive searching on this topic but have not found much info that involves VSTS and SVN issues. Any guidance or questions will be greatly appreciated.
The CI's Polling Job is executed by the Job Agent on the TFS server. Apparently, your Job Agent is configured to run as NT AUTHORITY\NETWORK SERVICE (i.e., as DOMAIN\TFSSERVER$). On the other hand, it looks like you VisualSVN Enterprise instance is configured to use NTLM. In this case, basic credentials are not used by the SharpSvn library the Polling Job uses to access the repository. Unfortunately, that's SharpSvn restriction. You either should provide the computer account (DOMAIN\TFSSERVER$) with the READ access to the SVN repository in the VisualSVN server configuration (to continue using NTLM), or disable NTLM on the VisualSVN server to switch to Basic authentication.
[Few technical details]The anonymous requests you see in SVN logs are part of the normal HTTP request flow implemented in the SharpSvn library:
The library first submits an anonymous request to the server.
If the server rejects the request, the library inspects the WWW-Authenticate response headers to detect the authentication scheme
requested by the server.
The WWW-Authenticate: NTLM header has a higher priority comparing to WWW-Authenticate: Basic. That's why username and password
specified in the connection endpoint are not used at all.
If only the WWW-Authenticate: Basic header is present in the response, the library uses a callback function provided by the client
To request credential information. At this point username and
the password specified in the connection endpoint is provided to the
library by the Polling Job.
[Note 1] The Polling Job does not download any sources from the SVN repository, it only requests the list of files changed since its last successful execution and decided if it's time to schedule a build.
[Note 2] If the Polling job continuously fails for the same reason, it reports each 100th failure to TFS as a failed build providing a reason of the failure.
Alex
I look to be having a similar issue. Using TFS 2015 Update 3 and VisualSVN Server 3.4.6. I get the same error with CI polling. On the SVN Server I get the following errors every time TFS polls: Access denied: 'TFSSERVER$' OPTIONS : [client ]
Here TFSSERVER$ is the computer name of our TFS Server.
So I gave DOMAIN\TFSSERVER$ Read Only permissions at the root of the repository and then things worked OK. Not happy that I had to do that of course.
Filed this bug about it: SVN CI Polling Uses TFS Machine Account Not SVN Account Set in the Service EndPoint
There isn't any big difference between CI and manual/scheduled build for SVN repository. When you configure it to continuous integration, it just keeps checking the SVN repository by the Polling interval you set and then run the build if there is any new change. The only difference between them is that you need to set "Filters" for CI and base on the access forbidden error message you get, you don't have the permission to read the path. So you need to check if your account has the read permission to the path you set in "Filters".