I'm trying to run Plaid quickstart tutorial but it says I'm unable to fetch link_token - visual-studio-code

So I've been trying to do a quickstart tutorial by Plaid (https://www.youtube.com/watch?v=sGBvKDGgPjc&t=540s) so I can implement it in my app after. I was using Windows 11 and Visual Studio Code.
I cloned their git using git clone -c core.symlinks=true https://github.com/plaid/quickstart
It printed this at the end:
Cloning into 'quickstart'...
remote: Enumerating objects: 3603, done.
remote: Counting objects: 100% (962/962), done.
remote: Compressing objects: 100% (262/262), done.
Receiving objects: 100% (3603/3603), 2.98 MiB | 8.47 MiB/s, done.ed 2641
Resolving deltas: 100% (2205/2205), done.
error: unable to create symlink go/.env: Permission denied
error: unable to create symlink go/.env.example: Permission denied
error: unable to create symlink java/.env: Permission denied
error: unable to create symlink java/.env.example: Permission denied
error: unable to create symlink node/.env: Permission denied
error: unable to create symlink node/.env.example: Permission denied
error: unable to create symlink python/.env: Permission denied
error: unable to create symlink python/.env.example: Permission denied
error: unable to create symlink ruby/.env: Permission denied
error: unable to create symlink ruby/.env.example: Permission denied
fatal: unable to checkout working tree
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry with 'git restore --source=HEAD :/'
Configured .env:
PLAID_CLIENT_ID=*client id*
PLAID_SECRET=*secret id*
PLAID_ENV=sandbox
PLAID_PRODUCTS=auth,transactions
PLAID_COUNTRY_CODES=US,CA
PLAID_REDIRECT_URI=
I started the server and tried to start frontend as in the video but it shows this error in a rectangle instead. Does anyone know what the issue is?
I haven't changed anything in the code. I only added .env and added API keys, that's it.
Edit: I moved my .env file to node folder where backend file is, and it seem to fixed the problem. It's all working now

A couple of thoughts:
The .env file you provided here is missing a PLAID_ENV=sandbox line, that would definitely cause an error if it's actually missing from the .env and not a copy and paste error in your question.
Those error codes make me think the Quickstart might not be able to read the .env file. If you log out the client id and secret to the terminal window, are they correct?
Take a look at the terminal window where the backend is running -- do you see any errors?

Related

fatal: unsafe repository is owned by someone else - GitHub actions workflow

I have two yml files configured in the GitHub actions. When new code is pushed to master, one yml file deploys the files to specific website folder, and the other one to another website folder.
Even though both websites are on the same server, one of the deploy.yml files is not executing jobs and it's throwing this error.
fatal: unsafe repository ('/var/www/yayyy.net/public_html' is owned by someone else)
To add an exception for this directory, call:
git config --global --add safe.directory /var/www/yyyy.net/public_html
Error: Process completed with exit code 128.
at this step:
- name: Add temp repo access
run: |
cd $DEV_WEBSITE_PATH
git remote set-url origin https://anything:${{ secrets.GITHUB_TOKEN }}#github.com/yyyyy/website.git
I tried adding extra step before that step and added this safe.directory command but then it's showing permission denied error.
error: could not lock config file /var/www/.gitconfig: Permission denied
Adding sudo before the command then throws this error:
sudo: sorry, you must have a tty to run sudo
I'm confused what I'm missing, can you help?
The.gitconfig did not exist and the username didn't have permission to create it. So, I created it manually and changed ownership to the username.

denied: Permission "artifactregistry.repositories.downloadArtifacts" denied on resource

i am using VSCODE to push image which is stored in Docker repo locally to GCP Artifact repo.
i ran gcloud auth configure-docker us-west1-docker.pkg.dev command in GCP console and while pushing image from VSCODE I got below error
command :-docker push us-west1-docker.pkg.dev/xxx/reponame/test-image
59769727d80: Waiting
348622fdcc61: Waiting
4ac8bc2cd0be: Waiting
denied: Permission "artifactregistry.repositories.downloadArtifacts" denied on resource "projects/xxx/locations/us-west1/repositories/reponame" (or it may not exist)

Concourse: resource script '/opt/resource/check []' failed: exit status 128

Environment:
OS: Ubuntu 18.04
Concourse: 3.14.0
Server is behind proxy. Concourse installation is binary, non-docker. Proxy has been setup in /etc/environment as:
> http_proxy="http://proxy01.localnet.local:8080/"
> https_proxy="http://proxy01.localnet.local:8080/"
In that server, I can successfully access outside:
$ git clone https://github.com/pivotal-cf/pcf-pipelines
Cloning into 'pcf-pipelines'...
remote: Counting objects: 20990, done.
remote: Compressing objects: 100% (29/29), done.
remote: Total 20990 (delta 13), reused 22 (delta 8), pack-reused 20953
Receiving objects: 100% (20990/20990), 25.70 MiB | 8.46 MiB/s, done.
Resolving deltas: 100% (11497/11497), done.
Error:
resource script '/opt/resource/check []' failed: exit status 128
stderr:
Cloning into '/tmp/git-resource-repo-cache'...
ssh: connect to host github.com port 22: Operation timed out
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
That's it. I can't find anything that can lead me to troubleshoot the environment.
Any feedback is greatly appreciated!!
Not knowing your git resource's source config, I bet that you're missing the private_key field there. With SSH urls, you always have to authenticate with a private key -- no such thing as anonymous git access. Anonymous access does exist over HTTPS, though, so that's why it fixed the problem.
Answering my own question: In pipelines.yml file I had to modify github URL and change it from
uri: git#github.com:pivotal-cf/pcf-pipelines.git
To this:
uri: https://github.com/pivotal-cf/pcf-pipelines
After that, it started working.
Recently I encountered this error with a 4XX error code. Turns out it was docker. An engineer had made their fork of a docker image public, so when our docker image was tagged no credentials were being supplied to the build and we were handed a 4XX error with this cryptic useless error message.
If you've recently edited a concourse pipeline with a dockerfile and are seeing this message, check the username and password are supplied and valid (can use docker login from cli or login at https://hub.docker.com. A short-term fix can be to make the image public, but a longer-term fix is to provide credentials to fetch a private image.

Jenkins returned status code 128 with github

With GitHub command I have:
ssh -T git#github.com
Hi (MyName)! You've successfully authenticated, but GitHub does not provide shell access.
My connection with GitHub is ok (no problem), but with Jenkins I have this error:
ERROR: Error cloning remote repo 'origin' : Could not clone git#github.com:Name-MysRepo/MyRepo.git
hudson.plugins.git.GitException: Could not clone git#github.com:Name-MysRepo/MyRepo.git
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.clone(CliGitAPIImpl.java:219)
at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1001)
at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:942)
at hudson.FilePath.act(FilePath.java:904)
at hudson.FilePath.act(FilePath.java:877)
at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:942)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1101)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1369)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:676)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:581)
at hudson.model.Run.execute(Run.java:1575)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:477)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:241)
Caused by: hudson.plugins.git.GitException: Command "git clone --progress -o origin git#github.com:Name-MysRepo/MyRepo.git /root/.jenkins/jobs/TestKRGDAOV01/workspace" returned status code 128:
stdout: Cloning into '/root/.jenkins/jobs/TestKRGDAOV01/workspace'...
stderr: Permission denied (publickey).
fatal: The remote end hung up unexpectedly
Is this problem with public key?
I use Jenkins under Tomcat 7 / Ubuntu 12.
This error:
stderr: Permission denied (publickey). fatal: The remote end hung up unexpectedly
indicates that Jenkins is trying to connect to github with the wrong ssh key.
You should:
Determine the user that jenkins runs as, eg. 'build' or 'jenkins'
Login on the jenkins host that is trying to do the clone - that is, do not login to the master if a node is actually doing the build.
Try you ssh to github - if it fails, then you need to add the proper key to <jenkins user home>/.ssh
To check are the following:
if the right public key (id_rsa.pub) is uploaded to the git-server.
if the right private key (id_rsa) is copied to /var/lib/jenkins/.ssh/
if the known_hosts file is created inside ~/.ssh folder. Try ssh -vvv git#github.com to see debug logs. If thing goes well, github.com will be added to known_hosts.
if the permission of id_rsa is set to 700 (chmod 700 id_rsa)
After all checks, try ssh -vvv git#github.com.
Also make sure you using the ssh github url and not the https
In my case I had to add the public key to my repo (at Bitbucket) AND use git clone once via ssh to answer yes to the "known host" question the first time.
i had sometime ago the same issue.
make sure that your ssh key doesn't have password and use not common user account (e.g. better to user account called jenkins or so).
check following article http://fourkitchens.com/blog/2011/09/20/trigger-jenkins-builds-pushing-github
When I got a similar status code 128 error from Jenkins:
status code 128:
stdout:
stderr: fatal: Couldn't find remote ref refs/heads/jenkins
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2172)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1864)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$500(CliGitAPIImpl.java:78)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:545)
at jenkins.plugins.git.GitSCMFileSystem$BuilderImpl.build(GitSCMFileSystem.java:358)
at jenkins.scm.api.SCMFileSystem.of(SCMFileSystem.java:197)
at jenkins.scm.api.SCMFileSystem.of(SCMFileSystem.java:173)
at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:113)
at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:67)
at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:299)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
Finished: FAILURE
It was because I hadn't pushed my new branch "jenkins" that had my Jenkinsfile. So the solution was to just push my changes
I deleted my project (root folder) and created it again. It was the fastest and simplest way in my case.
Do not forget to save all you changes, before you delete you project!
I first had another credential, then when i deleted that, and created a new one, i had the same error. I had to go to every project, and select the new Credential.
I changed the permission of my .ssh/id_rsa (private key) to 604.
chmod 700 id_rsa

Gitlab was unable to access your Gitolite system

I installed GitLab on Ubuntu server 12.
I followed this steps: http://blog.compunet.co.za/gitlab-installation-on-ubuntu-server-12-04/
Everything seems to be right... but when I try to create a new project, I get the error message:
Gitlab was unable to access your Gitolite system.
I ran the diagnostic tool ("bundle exec rake gitlab:app:status RAILS_ENV=production")
(in /home/gitlab/gitlab) Starting diagnostic
config/database.yml.............exists
config/gitlab.yml.............exists
/home/git/repositories/...........exists
/home/git/repositories/ is writable?........YES
remote: Counting objects: 12, done.
remote: Compressing objects: 100% (8/8), done.
Receiving objects: 100% (12/12), 1.12KiB, done.
Resolving deltas: 100% (1/1), done.
remote:Total 12 (delta 1), reused 0 (delta 0)
Can clone gitolite-admin?..............YES
UMASK for .gitolite.rc is 0007?............YES
/home/git/share/gitolite/hooks/common/post-receive exists?............YES
Finished
The log on admin area only shows:
ERROR -> /home/gitlab/gitlab/tmp/gitlabhq-gitolite-1348050652/gitolite
The config/gitlab.yml file is ok.
The permissions on repositories are just like the tutorial (section 3 - permissions).
I even tried to remove the lock...
What would you advise to troubleshoot this?
If it helps, I had a very similar situation happen, except in my gitlab log I had the following error:
ERROR -> Pull error -> unable to clone gitolite-admin repo
I had compared the commit of the gitolite fork metioned, and found that the changes there were already in place in my version of gitlab.
I ended up stopping the gitlab related services, deleting the contents of the gitlab tmp directory, then restarted the gitlab related services.
Afterwards, everything appeared to be working fine.
If the issue comes from permission regex fixed in this commit of this gitolite fork, you can have a look at "GitHub Tip: download commits as patches":
Your commit can be downloaded by adding a .patch at the end of its url: patch.
That way, you can apply it to your current gitolite source (without even using git itself, just by using the patch command)
I was able to resolve this issue on my server by following the installation instructions section titled "Disable StrictHostKeyChecking for localhost and your domain" and adding a new section for my gitolite host, which was set to the IP address of the server rather than localhost. Open:
/etc/ssh/ssh_config
And add the lines:
Host [gitolite hostname/IP here]
StrictHostKeyChecking no
UserKnownHostsFile=/dev/null
(replace the bracketed part with the appropriate hostname/IP)
It's already in the setup steps, but I had skipped it earlier because I didn't understand what it was suggesting. Otherwise, the SSH client tries to show the yes/no prompt to accept a new hostname and the Ruby backend interprets that as a failure to connect to gitolite.