i sent my rails app to someone Else's bit bucket account using git by mistake.every time i try to create a new repository and send my app it asks me for that other persons account password.how can i undo this?
You can set correct account for you git repo, by following command:
git config --global user.name "Your Name Here"
You can see these steps in gitbucket help page.
Other this which can help you is gitcredentials by which you is used to manage credentials
from the user. More details for this command is here.
git config credential.https://example.com.username myusername
Related
I have read: BitBucket: Host key verification failed and Jenkins Host key verification failed and several other links provided. I seem to find myself in an odd situation.
I want to clone my django repo into a digital ocean droplet. I am following the steps of this document. https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-18-04 .
Everything seems to have gone well, until the step where I need to create the django project. I already have a django project and thus don't want to create a new project on the server. I only need to clone it onto the server.
I ran : root#ubuntu-s-1vcpu-2gb-xxx:~#rsync --archive --chown=llewellyn:llewellyn ~/.ssh /home/llewellyn
My bitbucket has the id_rsa SSH key uploaded and it all worked in the past, no new SSH has been generated. And the repo is set to public.
When running:
(myprojectenv) llewellyn#ubuntu-s-1vcpu-2gb-xxx:~/myprojectdir$ git clone git#bitbucket.org:LlewellynHattinghLH/repo.git
Cloning into 'repo'...
Warning: Permanently added the RSA host key for IP address '18.205.xx.x' to the list of known hosts.
git#bitbucket.org: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
I have tried several articles, but most only tell me how to create a new SSH.
Any help would greatly be appreciated.
First, you can do:
export GIT_SSH_COMMAND='ssh -Tv'
Then the git clone will be more verbose, giving you more clues as to why it fails.
Second, regarding the permissions:
Your ~/.ssh must be 700, you keys 600: check that with ls -alrth ~/.ssh.
Note: what should be uploaded to your BitBucket is the id_rsa.pub public key, not the id_rsa private key.
remote: PERMISSION_DENIED: The caller does not have permission remote: [type.googleapis.com/google.rpc.RequestInfo]
Not able to clone, push the code into google cloud source repository. I have given "Project Editor" iam permission. I have successfully login with "gcloud login" command. I also have set the right default project configuration and account configuration using "gcloud config set project" and "gcloud config set account" commands. Please help me with this PERMISSION_DENIED error.
I had the exact same issue and I resolved it by adding a new entry in the .gitcookies file.
You have to manually generated and stored your Git credentials by login on this page: https://source.developers.google.com/auth/start?scopes=https://www.googleapis.com/auth/cloud-platform&state=
That will ask you to login with your account and allow Google Cloud Development wants to access your Google Account. Then, you'll have the script you have to run.
Hope this helps you as well.
For me it was that my free trial had ended and I needed to enable the billing here:
https://console.developers.google.com/billing/enable?project=[YOUR_PROJECT_ID]
For me this happened when I used SSH and connection re-use by a ControlMaster directive.
It seems like google's git implementation can't handle this.
For me either of these two worked:
close the ssh connection with ssh -O exit ... (add your connection)
delete the socket from the file system (specified by ControlPath)
Despite running gcloud auth application-default login and gcloud config set core/project CORRECT_PROJECT_ID the project keeps defaulting to an incorrect project id:
gcloud config list
[core]
account = CORRECT_EMAIL
disable_usage_reporting = True
project = CORRECT_PROJECT_ID
Your active configuration is: [default]
I can successfully run the sample code from the tutorial (below) if I run in the terminal
export GOOGLE_APPLICATION_CREDENTIALS="[PATH]"
However, I didn't want to have to do this every time, so I ran the command:
gcloud auth application-default login
This opened a browser with a list of my gmail accounts, and even though I selected the correct account, the success window went to a different gmail account. So then I tried it in an incognito window, and it worked.
However, running npm start resulted in the following error:
ERROR: { Error: 7 PERMISSION_DENIED: Cloud Natural Language API has not been used in project WRONG_PROJECT_ID before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/language.googleapis.com/overview?project=WRONG_PROJECT_ID then retry.
Then I ran gcloud config set core/project CORRECT_PROJECT_ID and got the message Updated property [core/project].
When I run npm start I get the same message:
ERROR: { Error: 7 PERMISSION_DENIED: Cloud Natural Language API has not been used in project WRONG_PROJECT_ID before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/language.googleapis.com/overview?project=WRONG_PROJECT_ID then retry.
I tried gcloud auth login and got the following message (after I authenticated in an incognito window):
WARNING: `gcloud auth login` no longer writes application default credentials.
If you need to use ADC, see:
gcloud auth application-default --help
You are now logged in as [CORRECT EMAIL ADDRESS].
Your current project is [CORRECT_PROJECT_ID]. You can change this setting by running:
$ gcloud config set project PROJECT_ID
I have a few suggestions that may correct this behaviour.
1) Clear your web browser cache & cookies. Then run "gcloud auth application-default login"
2) Try re-installing the gcloud toolkit.
3) Try unsetting the project in your config first, then set the project to the correct project. i.e.
gcloud config unset project WRONG_PROJECT_ID
gcloud config set project CORRECT_PROJECT_ID
4) Check the “CLOUDSDK_CORE_PROJECT” environment variable. Set it to the correct project if it is not already.
5) Try re-running “gcloud init”
6) You can find your application default credentials in
Linux: ~/.config/gcloud/application_default_credentials.json
Windows: C:\Users\%username%\AppData\Roaming\gcloud\credentials
You can delete the file, & regenerate it using commands you had mentioned in your question such as “gcloud auth default-credentials login”
We need to find where npm start is getting its credentials from. Once we figure that out, we can figure out how to change it, & understand why it’s looking there etc.
Are you able to find the config file to see where it is looking for credentials?
Is npm start the entire command? I’m not too familiar with Node JS. I’m not sure why it is trying to use Natural Language API.
You also mentioned a tutorial but I think you may have forgotten to include it in your question. Which tutorial are you referring to?
When you're trying to deploy an app to Heroku, and you're prompted for the username and password for https://git.heroku.com and https://#git.heroku.com, are the credentials for these items the same as your credentials for your heroku account? Or are they your GitHub credentials? I've tried numerous combinations of both of my accounts, and I keep getting the error:
remote!: WARNING:
remote!: Do not authenticate with username and password using git
remote!: Run 'heroku login' to update your credentials, then retry the git commmand
I've rerun heroku login several times, entering the correct password to heroku each time, to no avail.
Just use your heroku credential only.
When you successfully authenticated ~/.netrc have some information about the login.
For more info
I'm making an app with Django and I want to upload it to Heroku but when I do
git push heroku master
I got this error and I don't know how to fix it.
! Your account myemail#gmail.com does not have access to fathomless-depths-4588.
!
! SSH Key Fingerprint: xx:xx:xx:xx:xx:xx:xx:xx:xx:02:xx:xx:79:xx:0f:xx
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
and I'm not using that mail "myemail#gmail.com" it's from an old project, I already use: heroku logout, and heroku login but it doesn't work.
I don't know is the SSH is important that's why I put it on xx xD!
I'll appreciate any help.
You should have a look at heroku-accounts - allows you to manage multiple accounts on the same machine.
https://github.com/ddollar/heroku-accounts.
Hope this helps.