New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow http(s) git actions using application token #842
Comments
Will Git converts |
I don't think so. We probably need to add some logic in gogs that if we don't find the username, check if the username is actually a token. Some more info here: https://github.com/blog/1270-easier-builds-and-deployments-using-git-over-https-and-oauth |
I want to say that Go looks like cannot get content before But,
I think it would work. 👍 |
Hi @compressed , thanks for waiting. I've pushed some fixes based on changes you made on #845 . You are also free to try on https://try.gogs.io/ |
As new mirror release |
Please has this feature being added ? Please how do I learn more how to use it to pull .tar from my private repository |
@lavvy this was implemented a while ago, based on the code, yes, it has added. |
Oh cool. So I am cloning into Jenkins with this url when it's public repo And I download tar file with this url So if it now private repo, how will the urls be ?
|
@lavvy it is exactly same URL, except you have to be logged in. |
You use |
Yeah I mean assessing it from a url for instance Jenkins will access it as
|
And then how to generate the token for a repo. I couldn't just see how
|
wget https://try.gogs.io/lavvy/newproj/archive/master.tar.gz
There is no such that token for a repo, only token for a user |
sorry for my english may be we are missing something here. please reproduce this please here BUT : if you click this you CANNOT download the tar file because it is a PRIVATE repo NOW: I TRIED THIS On 9/1/15, 无闻 notifications@github.com wrote:
|
Please any docs on how to do this please
|
@lavvy well.. I've said you can use basic auth through HTTP(it's not a topic of Gogs, it's HTTP standard)... |
you mean like this ? https://try.gogs.io/lavvy/bogons/archive/master.tar.gz?token=usertoken On 9/1/15, 无闻 notifications@github.com wrote:
|
I just don't understand why a Google search is so hard... https://docs.oracle.com/cd/E24191_01/common/tutorials/authn_http_basic.html |
@unknown, am sorry for stressing you out , but please pardon me , i IN GITHUB : IN GITLAB: IN BITBUCKET : IN GOGS ; once again thank you guys for the beautiful job you guys are doing right there On 9/1/15, Uche Okonkwo lavashonline@gmail.com wrote:
|
I took some time to test this functionality. I see that it works for git commands, eg:
But not for all URLs, for example the below doesn't work:
|
@lavvy OK. Sorry for poor docs... I just added allow URL query to pass token value like all of your 3 examples in So in your example you need to download a raw blob, here is the example from my local server:
The basic format it:
|
yeah, thats what i meant . @unknown it now works like charm but i meanwhile thanks @vijairaj, On 9/2/15, 无闻 notifications@github.com wrote:
|
@lavvy yeah, OK, let me see. |
OK, on
example
|
Pure. So Pure. thumbs up man. this is good so far and keep up the good On 9/2/15, 无闻 notifications@github.com wrote:
|
@lavvy 😉 |
yeah, real good feature right there @unknwon , but it wasnt easy . you remember u almost gave up yesterday, but u didn't and thats how great guys are born. 👍 |
Please, looks like this feature is broken or removed or changed . It doesn't work again. |
We are attempting to use token based git pushes so that we don't have to send passwords. Does anybody have any tips on using this with git actions such as pushing to gogs? |
@klappy I think use access token as username with empty password should work already. |
So how do I push throw token? git push -u https://gogs.erguotou.me/erguotou/gift-pwa.git?token=token master --force like this? |
@erguotou520 no, use token ad username when Git prompts you. |
I was wondering if we can use the application token that a user has created to also permit git actions to repos the user has access to.
This is useful when it's needed to programmatically push commits to a repo.
GitHub allows this via the following:
Edit: It would be best if the token works for the gamut of git actions: e.g. pull, push, clone, etc.
The text was updated successfully, but these errors were encountered: