Comments (6)
@gallardo please check 0.4.0 😁
example
github {
...
baseUrl = 'https://api.github.com`
...
}
from gradle-github-plugin.
To my despair, since a few hours I'm trying a similar approach. Unfortunately, neither it nor your last 0.4.0 version seems to work in my environment (see logs below).
I'm being redirected and the HttpClient cannot cope with that redirection (although it should). I guess it must be an authentication problem, though I cannot understand it because I have identical configuration in GitHub.com and GitHub Enterprise (it works in GitHub.com).
I can upload artifacts for a release with curl
passing the same headers and data as what the plugin should send:
curl -i -H "User-Agent: gradle-github-plugin" \
-H "Authorization: token mytokenmytokenmytokenmytoken" \
-H "Accept: application/vnd.github.v3+json" \
-d '{"tag_name":"testtag", \
"target_commitish":"master", \
"name":"test: name of the release",\
"body":"my body"}' \
https://githubenterprise/api/v3/repos/myuser/tests/releases
I'll double and triple-check everything, but I cannot avoid the dumb question: did it work for you? And if yes, for what GitHub Enterprise API version? We are using https://developer.github.com/enterprise/2.4/
.
Here the logs:
15:25:12.811 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter] Executing actions for task
':githubRelease'.
15:25:12.812 [DEBUG] [co.riiid.gradle.HttpBuilder] POST https://githubenterprise/repos/myuser/tests/relea
ses
15:25:12.823 [DEBUG] [org.apache.http.impl.conn.BasicClientConnectionManager] Get connection for route {s}->https://githubenterprise
15:25:12.825 [DEBUG] [org.apache.http.impl.conn.DefaultClientConnectionOperator] Connecting to githubenterprise:443
15:25:12.881 [DEBUG] [org.apache.http.client.protocol.RequestAddCookies] CookieSpec selected: best-match
15:25:12.881 [DEBUG] [org.apache.http.client.protocol.RequestAuthCache] Auth cache not set in the context
15:25:12.881 [DEBUG] [org.apache.http.client.protocol.RequestProxyAuthentication] Proxy auth state: UNCHALLENGED
15:25:12.881 [DEBUG] [org.apache.http.impl.client.DefaultHttpClient] Attempt 1 to execute request
15:25:12.881 [DEBUG] [org.apache.http.impl.conn.DefaultClientConnection] Sending request: POST /repos/myuser/tests/r
eleases HTTP/1.1
15:25:12.899 [DEBUG] [org.apache.http.impl.conn.DefaultClientConnection] Receiving response: HTTP/1.1 302 Found
15:25:12.900 [DEBUG] [org.apache.http.client.protocol.ResponseProcessCookies] Cookie accepted: "[version: 0][name: logged_in][value: no][domain: githubenterprise][path: /][expiry: Sat Feb 16 15:25:12 CET 2036]".
15:25:12.900 [DEBUG] [org.apache.http.impl.client.DefaultHttpClient] Connection can be kept alive indefinitely
15:25:12.900 [DEBUG] [co.riiid.gradle.HttpBuilder] Response code: 302; found handler: co.riiid.gradle.ReleaseTask$_release_closure1_closure3@3ba5ef4f
15:25:12.900 [DEBUG] [co.riiid.gradle.HttpBuilder] Parsing response as: text/html
15:25:12.901 [DEBUG] [org.apache.http.impl.conn.BasicClientConnectionManager] Releasing connection org.apache.http.impl.conn.ManagedClientConnectionImpl@6c02c6b8
15:25:12.901 [DEBUG] [org.apache.http.impl.conn.BasicClientConnectionManager] Connection can be kept alive indefinitely
15:25:12.901 [DEBUG] [co.riiid.gradle.HttpBuilder] Parsed data to instance of: class groovy.util.slurpersupport.NodeChild
15:25:12.901 [QUIET] [system.out] You are being redirected.
15:25:12.902 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Finished executing task ':githubRelease'
15:25:12.902 [LIFECYCLE] [class org.gradle.TaskExecutionLogger] :githubRelease FAILED
from gradle-github-plugin.
Actually I've never use Enterprise 😢.
from gradle-github-plugin.
😧 so it could be in fact a problem. Thanks in any case for your code and your prompt response. I'm still trying to find out what's going wrong.
from gradle-github-plugin.
I look forward to hearing good news. Thank you 🙇
I also investigate it.
from gradle-github-plugin.
see #6
from gradle-github-plugin.
Related Issues (9)
- Support Gradle 2.1+ plugin id semantics HOT 2
- Help needed: is there is away to remove the uploaded draft and attachment.
- Strange File Names Under Windows HOT 1
- Future releases > support JDK6?
- README.md mixes up prerelease and draft?
- Appling this plugin crashes the build
- Asset upload failing HOT 2
- Fail on http request failure HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gradle-github-plugin.