Reputation: 21
We're having issues writing to a repository using our Github API Token, probably because what we're trying to achieve isn't possible. If it isn't feasible then I would like an explanation of why we can't perform the following:
We would want to avoid the Web Application Flow because what we want deems simple. Ideally we would like to use our API token like this:
Following this guide: https://github.com/blog/1270-easier-builds-and-deployments-using-git-over-https-and-oauth If we scroll to the very bottom of "Using OAuth with Git", we will see:
To avoid writing tokens to disk, don't clone. Instead, just use the full git URL in your push/pull operations
As the doc states, we would like to perform push/pull operations. An example pull operation would be:
mkdir foo
cd foo
git init
git pull https://<token>@github.com/username/bar.git
Now we would want to perform a push operation (ie: something like below, as the documentation implies)
git add file
git commit file -m "Changed file"
git push https://<token>@github.com/username/bar.git master
The problem we're running into is on the push phase; we are stuck in performing the push operation. The error we receive is:
fatal: Authentication failed
What are we missing? All we want is for the service account to perform push/pull operations via the documentation I provided above. The service account has been added (with read/write access) to our organization.
Points worth mentioning:
Upvotes: 1
Views: 883
Reputation: 21
It appears to be related to the SSL not being enabled for our current version of Github Enterprise. The solution for my particular problem is to run on the latest version. This is something out of my hands but if someone encounters a similar problem, you should reach out to your employer's support desk.
Upvotes: 1