I've been using Heroku normally in the past few months. In the beginning, I created a ssh key, I added it to my Heroku account and I could deploy my apps without any problem. Until today. I'm working on a new project and I needed to create a new Heroku account under a different e-mail address. After a while I realized I couldn't deploy this app using a new e-mail address because my SSH key was associated to a different e-mail. Then I created a new SSH key and added it to my new Heroku account. It didn't work! :)
Well, I removed the key from my computer and from my new Heroku account. Then I decided to go back to my original Heroku account. Everything works, well, more or less. I can still deploy my old apps, I can see I only have one SSH key there, I can run the commands: heroku info, heroku apps, etc.
So then I tried to deploy my new app, but before I created a new Heroku app using: heroku create. The new app was created successfully. But when I try: git push heroku I get this error:
! Your key with fingerprint
b2:69:3b:90:1e:e1:60:ad:a0:b9:f7:::*:* is not authorized to
access furious-leaf-9996.
If I try: heroku info, I get this error:
! You do not have access to
furious-leaf-9996.
The funny thing is, if I switch to the other app's directory and try to do the same thing (ex.: heroku info, git push heroku), everything works perfectly.
Note 1: When I try heroku logout then heroku login, I'm always able to connect, in both app's directory
Note 2: I'm using RVM and both apps use different gemsets.
I don't know what else to do!! Anyone??
Thanks!
After getting almost crazy I found out what was happening.
When I first tried to login on my second Heroku account, my .git config file was updated with this info:
[remote "heroku"]
url = git#heroku.com:furious-leaf-9996.git
fetch = +refs/heads/*:refs/remotes/heroku/*
And this was the problem. Even logging out and logging in again in different Heroku accounts, every time I tried to push my files there, I couldn't because I didn't have access to this repository. And it got worse because I deleted this repository. :)
Now everything is working properly.
So next time you have access problems on Heroku, take a look at your git config file!
Thanks!
Related
Hey guys so I have an xcode bot problem. Basically I have a bot that requires a pre-script to be ran. This script runs the command a git submodule init and update, and gets an ssh authentication error.
On the os x server machine it self the appropriate ssh keys have been set on the user admin (tested). In xcode on my machine the server is connect as the user admin. However it seems like when the script is being run it is not being run as admin(tested by creating a text file in ~ and wasnt there after). I was wondering if it was possible to su in the script, i've looked online and it seems like it wouldn't be possible because I don't know what user xcode bot is running the script as (my guess is its running as Guess)
Any advice on this? Or on a way to run the command as a different user(must be in the script)
_xcsbuildd is the account which the bot runs under. Make sure that account has the necessary permissions.
Xcode server runs an integration from a separate user called _xcsbuildd. If it is possible for you to login remotely to the machine that Xcode Server is running then you can login under that user through the Terminal, and should be able to add or check any ssh keys that are loaded with that user.
Here is a useful blog post on how to do this http://papaanton.com/setting-up-xcode-6-and-apple-server-4-0-for-continues-integration-with-cocoapods/
Scroll down to the part called Adding additional SSH Key to the Xcode Server That should be able to walk you through how to do that. I know its not an automated script, but its how I was able to get past my SSL issues, and maybe it'll help you as well
My laptop died and I need to code from another computer.
I am working with Heroku and I want to get the latest version of code from Heroku to another machine.
I understood that it is very recommended to get a proper remote repository using GitHub or BitBucket.
I decided to try BitBucket.
While creating my account, it asks for the old URL of my git repo. Since my machine is dead, I was hoping to fill in the heroku URL but that didn't work.
Any ideas how to proceed?
The idea is that I could pull and push my changes from either machines (when my laptop comes from repair).
You can simply clone your Heroku repository to your local machine. Then add BitBucket as a remote and push the code there.
Find out the Heroku repo url on the settings page of your app
https://dashboard.heroku.com/apps/[APP]/settings
git clone git#heroku.com:[APP].git
git remote add bitbucket ssh://git#bitbucket.org/[ACCOUNT]/[REPO].git
git push bitbucket master
I am trying to add an SSL certificate which I just bought to my custom domain heroku app. Right now I have www.tradespring.net CNAME'd to tradespring.herokuapp.com.
I am going through this article: https://devcenter.heroku.com/articles/ssl
and I have reached the point of add your SSL add-on.
But it adds it to the wrong app. It adds it to one of my previous apps on a previous account which is now deleted. How do I tell it to add it to my app. When I run heroku apps it only lists one, which is the correct one.
alex#alex-ThinkPad-T410:~$ heroku addons:add ssl:endpoint
Adding ssl:endpoint to sharp-leaf-1669... failed
! App not found
You need add the app name after the command,
like this:
$ heroku addons:add ssl:endpoint --app tradespring
I am trying out Github for Windows and I am getting the following error when I try to publish a newly created repository.
Authentication failed
Your credentials may be out of date. Please log out of the application and then log back in before retrying the operation.
Needless to say I've logged out and back in multiple times without success. I've also uninstalled and installed the latest version to no avail.
The repository is a new one I created within the application and contains only the .gitattributes, .git and README files.
I am a complete newbie to Github so it's quite possible I've messed something up during the setup process.
I was able to solve this by:
Press Settings - Open in GitShell.
git status
git push (or pull)
introduce credentials (here is the most important step, somehow git client messed up or forgot your credentials).
After giving correct credentials you can exit from git shell and use git client again.
It turns out that the problem was Github for Windows was having a problem with the password it had stored. Github support's instructions were as follows:
Log out of Github for Windows.
Change my password on github.com
Log back into Github for Windows.
I was then able to publish my changes.
Did you setup your ssh keys?
https://help.github.com/articles/generating-ssh-keys#platform-windows
So I used heroku create with one of my apps, but then when on heroku.com I deleted the corresponding repository. I tried using heroku create again and it did give me another URL, but now when I try to push my app it keeps looking for the old one:
! No such app as [old name]
fatal: The remote end hung up unexpectedly
How do I get heroku to stop looking for this old app and use the newly created one?
Your local git repository has the old URL saved in its heroku remote. You have to update it using
git remote set-url --push heroku git#heroku.com:new_app.git
See Heroku's documentation and the Git manpage for more information.