Ask A Question

Notifications

You’re not receiving notifications from this thread.

Hatch: Deploying my first App

Nick McNeany asked in Servers

Hey Chris,

I was playing around with Hatch last night and it's really cool, awesome work! I am having a little drouble deploying though.

I'm getting this

Git clone failed

This usually happens because you either had a typo in your git repo name or your server didn't have permission to clone.

  1. Double check you didn't make a typo with the repository name
  2. Make sure that your server's SSH deploy key has been added to your git server.
  1. Repo name is good.
  2. I'm sure this where my problem lies. I'm not exactly sure what to do here.

Here's the error after cloning fails (let me know if you want the whole error) :

Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
git clone failed
  • I'm using BitBucket. I have an ssh key set up for my account and I added it to my Hatch account.
  • I configured my repos git config file to use ssh instsead of https.

I also can't ssh into my server using the provided ssh deploy@IPaddress. I get Permission denied (publickey)

DevOps is clearly not my thing, so I appreciate any help! Please let me know if anyone needs any more info.

Thanks!

Nick

Reply

So two things here:

  1. Did Hatch successfully add an SSH key to your BitBucket account? I've had a ton of trouble with their API on this.

Hatch generates a key for your server so it can check out your code and that way it doesn't have to know your personal SSH key either when it clones your repo.

  1. You have to add your SSH key to the server with the SSH Keys tab in the UI so you can SSH in. By default, there aren't any keys on the server, so you won't be able to login until you do that.

You can also add the SSH key to your account which will be pre-installed on all the new servers you setup as well for convenience. You'll still have to add it to the already created server individually though.

Reply

Hey Chris,

Thanks for the quick response!

  • Added the SSH Key to the already created sever. Problem solved!
  • I dont see an SSH Key from Hatch anywhere in my BitBucket settings. Is there a way to do this manually?

Let me know if you need more info.

Thanks again for your help!

Reply

I just manually re-ran the add SSH key script on your server. You should see the server's SSH key in your bitbucket account now at https://bitbucket.org/account/user/USERNAME/ssh-keys/

Was doing support and accidentally posted as the wrong account in case you saw the email notification from the wrong user. ;)

Reply

Chris! you are the man, it's there! Thanks for the awesome, quick support!

Haha, I did see the email notifacation. Your secret identity is safe with me ;)

Reply

Haha! Perfect. Only you and the internet will know. ;)

Trying to think why that happened. Did you add your Bitbucket account after your server was provisioned?

Reply

No, I definitely connected all my accounts way before the server was provisioned. I added all my accounts right when I signed up, then a couple weeks later created my first server.

Let me know if you have anymore questions or if there's anything else I can do to help.

Reply

Hmm! I guess probably since you tested it earlier on I probably fixed some of the bugs around the Bitbucket stuff. I will wait until another report of that issue and see if it's a consistent thing or not. :)

If you run into any other issues, just ping me and I'll make sure it gets all fixed up.

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 82,329+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.