gactions cli Oauth processing is broken for me - it's unable to connect after following the initialization directions:
$ gactions --verbose list --project JovoTest
Checking for updates...
Successfully fetched update metadata
Finished checking for updates -- no updates available
Reading credentials from: creds.data
Gactions needs access to your Google account. Please copy & paste the URL below into a web browser and follow the instructions there. Then copy and paste the authorization code from the browser back here.
Visit this URL:
https://accounts.google.com/o/oauth2/auth?access_type=offline&client_id=237807841406-o6vu1tjkq8oqjub8jilj6vuc396e2d0c.apps.googleusercontent.com&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&response_type=code&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Factions.builder&state=state
Enter authorization code:
4/AACp4YGiTu6LNJGbNBU3qV3hDbLL4a4d5SuN72UuIO6fXESUChlTF5s
Saving credentials to: creds.data
GET /v2/agents/JovoTest/versions?pageSize=10 HTTP/1.1
Host: actions.googleapis.com
User-Agent: Gactions-CLI/2.1.3 (darwin; amd64; stable/dff629ae63fd0b047d19687b79274524569714e6)
Accept-Encoding: gzip
ERROR: Couldn't fetch versions
ERROR: The caller does not have permission
2018/06/26 12:43:02 Server did not return HTTP 200
I don't think this is related to authentication of the tool. I believe that the project you're setting up does not have any versions of the action available. I tried with a number of my own projects:
~/Downloads/gactions list --project assistant-sdk-project
ERROR: Couldn't fetch versions
ERROR: Requested entity was not found.
~/Downloads/gactions list --project felker-action-1
Version Create Time Update Time Approval Deployment Status
v-[1]-2018-03-10 3 months ago 1 month ago APPROVED DEPLOYED
What do you currently have set up for your action?
Related
I am trying to follow these docs to download an artifact from github using githubs API:
https://docs.github.com/en/rest/actions/artifacts#download-an-artifact
I ran the curl command given in the docs, and it gave me the following url from which to download the artifact (I have replaced the specifics with ...)
https://pipelines.actions.githubusercontent.com/serviceHosts/..../_apis/pipelines/1/runs/16/signedartifactscontent?artifactName=my-artifact&urlExpires=....&urlSigningMethod=HMACV2&urlSignature=....
I am able to download the artifact by putting the URL into my browser (it automatically downloads when the URL is visited) however I tried to use wget to download it via console and got this error:
wget https://pipelines.actions.githubusercontent.com/... # the command I ran
HTTP request sent, awaiting response... 400 Bad Request # the error I got
How can I download a zip file to console? Should I use something other than wget?
I'd like to clarify that viewing this link in the browser is possible even when not logged in to github (or when in private browsing). Also, I can download the zip file at the link as many times as I would like before the link expires after 1 minute. Also my repo is private, which is necessary for my work. I need to use an access token when doing the curl command as described in the docs, however the link that is returned to me does not require any authentication when accessed via a browser.
The api docs seem a bit ambiguous here. It is possible that the redirect can only be accessed a single time in which case you should try generating the redirect and first using wget to parse it. You can then unzip the file using the unzip command.
If that is not the case I believe this statement in the api docs is key:
Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the repo scope. GitHub Apps must have the actions:read permission to use this endpoint.
My guess is that your repository is private and you are logged in on the browser to Github which allows you to be authenticated hence why you are able to download from the redirect link. I would suggest trying from incognito mode to test this.
Migrating the repository to public would allow you to bypass this issue. Alternatively you can pass the authentication token as a header to wget like so in order to authenticate with the server to pull the file.
header='--header=Authorization: token <TOKEN>'
wget "$header" https://pipelines.actions.githubusercontent.com/... -O output_file
The problem was that I didn't put quotes around my url. I needed to do this:
wget "https://pipelines.actions.githubusercontent.com/serviceHosts/..../_apis/pipelines/1/runs/16/signedartifactscontent?artifactName=my-artifact&urlExpires=....&urlSigningMethod=HMACV2&urlSignature=...."
As requested by Preston PHX, I uploaded a full copy of my
code to Dropbox:
My test ASP.NET Web App
I hope this helps someone to identify what I may have done wrong
#####################################
I am trying to use the sample code at https://github.com/paypal/Checkout-NET-SDK/tree/develop/Samples to make contact with the Sandbox but it doesn't work for me. In order to find out why, I ran my code in Visual Studio under Localhost in debugging mode, using several breakpoints.
This line of code in my test page ...
var createOrderResponse = CreateOrderSample.CreateOrder(true).Result;
... displayed the following error:
Inner Exception 2:
HttpException: {"error":"invalid_client","error_description":"Client Authentication failed"}
However, it was the environment function in PayPalClient.cs (modified to use my PAYPAL_CLIENT_ID and PAYPAL_CLIENT_SECRET) that appears to have generated the error:
public static PayPalEnvironment environment()
{
return new SandboxEnvironment(
System.Environment.GetEnvironmentVariable("PAYPAL_CLIENT_ID") != null ?
System.Environment.GetEnvironmentVariable("PAYPAL_CLIENT_ID"):"<<PAYPAL-CLIENT-ID>>",
System.Environment.GetEnvironmentVariable("PAYPAL_CLIENT_SECRET") != null ?
System.Environment.GetEnvironmentVariable("PAYPAL_CLIENT_SECRET"):"<<PAYPAL-CLIENT-SECRET>>");
}
I very carefully copied my PAYPAL_CLIENT_ID and PAYPAL_CLIENT_SECRET from the REST API app I created via the PayPal Developer Dashboard. Apart from that, the GitHub sample code has not been modified. I could see no requirement in the GitHub code to specify a Sandbox URL and assume that this is provided by the PayPalCheckoutSdk via the use of "return new SandboxEnvironment()".
It's not obvious to me why my attempt to connect to this Sandbox account is failing the authentication process. What might I be doing wrong? Is it anything to do with my use of Localhost?
EDIT on 1 Nov 2021 in response to Preston PHX
Creating a new Sandbox Client ID and Secret made no difference. Prompted by another forum post I read some time ago, I also tried using ngrok (for the first time) to open http port 80 to facilitate PayPal testing via Localhost, but the connection to the Sandbox still failed authentication.
Sandbox Client ID: AZcb8XrqhJEUO7lS_JtKSe3sdNDLESmo3ekhupDKTL1J9vQCKVOzacCjO3PBQwSfngYkLGa-qS7EUrGV
Secret:
EBEcuPewHdzCB8p0qE1Yszjk2eMyFCstzkL0Diz2WC5IQREsu6cDHr7yFG9a-GDIyljb-KRb2DA6Hoey
I installed curl (plus Bash and Git) on my Windows 10 PC and ran the curl command specified on the get-an-access-token page. I couldn't find a way to post the result here in an easily readable form so I put it in a Word doc and uploaded that to Dropbox.
https://www.dropbox.com/s/knia3y2ighfzxpa/Result%20of%20PayPal%20curl%20command.docx?dl=0
Edit on 2 Nov 2021
As requested by Preston PHX, I have uploaded a copy of the ASP.NET Web App I have been using for my tests to Dropbox.
https://www.dropbox.com/sh/4uclfs2lexv4v42/AAAjoZIN5cEMV1mu0cYi24zKa?dl=0
I've only uploaded the project folder, as I'm guessing that it is unnecessary to upload my Solution files.
Create a new sandbox client ID and secret in the developer dashboard. Test with the new client ID and secret.
If issues persist,
Update your question with both the new sandbox client ID, and the new sandbox secret.
Update your question with a sample curl command to get an access token, showing the entire command and the entire response in your question.
I get the following error
We cannot complete your request
server_error: The request could not be completed. Please try again later.
Error link:
https://login.live.com/HandleGithubResponse.srf?code=c3f48c4783f6d1d5ef1b&state=38FEE58AB9343DAB#
update
I used GitHub to log in to Azure before, and published a plugin. Now, when I want to log in to Azure using GitHub, I will be forced to log in to my MS account. My mailbox is rxliuli#gmail.com on both MS and GitHub.
At the same time, I created an organization rxliuli after logging in with an MS account, Azure did not have any errors, but when I want to log in to rxliuli (create a personal token), it will prompt ERROR Failed request: (401) What's wrong, is there any way for me to use the publisher name rxliuli after logging in with GitHub before?
update
I can't use vsce to create any new users right now. . .
update
Currently, I can use github to log in to azure, but using vsce login rxliuli still shows ERROR Failed request: (401), I am sure that the token has all permissions and has not expired
Well, actually because the token I created has no choice to allow all organizations. . .
ref: https://code.visualstudio.com/api/working-with-extensions/publishing-extension#i-get-403-forbidden-or-401-unauthorized-error-when-i-try-to-publish-my-extension
In VSTS Build definition, .Net Core Publish task started failing suddenly with below error.
Unable to load the service index for source
https://microsoft.pkgs.visualstudio.com/_packaging/Universal.Store/nuget/v3/index.json.
Response status code does not indicate success: 401 (Unauthorized).
The same build agent is working for the above package for the same step. It started failing suddenly from October 1st.
You most likely have an expired Personal Access Token in the .NET Core publish step. Check if that step is using any Service Endpoints and verify that any tokens in those endpoints are not expired.
I'm attempting to set up a scheduled fetch for a product feed in Facebook Business Manager. From what I can see, I can provide an FTP link to Facebook along with credentials and it should pick up the file.
The FTP provider I'm using is ShareFile, with the appropriate account given access to the folder the file is in. I confirmed I can use these credentials and connect to the FTP using FileZilla, so that portion should be solid. The setup in FileZilla is as follows:
Host: host.sharefileftp.com
Protocol: FTP
Encryption: Require implicit FTP over TLS (port 990)
User: domain\facebookfeed#host.com
Password: ######
However, when I put the same credentials into Facebook Business Manager for the feed upload, I get the following error:
Fetching product feed from FTP server failed due to unknown reason
(Curl error code: 56). Please help us by reporting the problem. You
may be able to try again.
All I can find on this error is from the cURL error page:
CURLE_RECV_ERROR (56)
Failure with receiving network data.
I saw a mention somewhere about needing to whitelist Facebook's IPs within ShareFile, but I can't for the life of me find that page.
FTP Details are set up in Facebook as follows:
URL: ftp://host.sharefileftp.com:990/Path/To/File.csv
Username: domain\facebookfeed#host.com
Password: ######
I've been unsuccessful getting anywhere else with the Facebook documentation and I can't find a way to contact their support directly. If anyone has experience with this any help is appreciated!
EDIT: Trying this just with a direct cURL and getting the same results:
$ curl -u 'domain\facebookfeed#host.com' "ftp://host.sharefileftp.com:990/Path/To/File.csv"
Enter host password for user 'domain\facebookfeed#host.com':
curl: (56) response reading failed
So at this point it's probably just an issue with ShareFile itself, nothing to do with Facebook.
As #jared pointed out in the comments, using ftps did allow the cURL to work:
$ curl -u 'domain\facebookfeed#host.com' "ftps://host.sharefileftp.com:990/Path/To/File.csv"
However, Facebook doesn't support ftps. It only supports ftp or sftp, which ShareFile doesn't support.
The normal ftp I originally tried didn't work because the ShareFile account used didn't have normal ftp allowed. Once that was turned on, Facebook was able to connect to ShareFile and grab the file successfully.