Skip to content

Commit

Permalink
Error out early on github auth failure
Browse files Browse the repository at this point in the history
  • Loading branch information
kislyuk committed Aug 11, 2016
1 parent c27280e commit 1253454
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion aegea/deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ def grant(args):
GitHub repo URL, create and record a deployment key accessible to
the IAM role.
"""
repo = get_repo(args.repo)
try:
role = resources.iam.Role(args.iam_role_or_instance)
role.load()
Expand All @@ -153,7 +154,6 @@ def grant(args):
iam_group=None,
iam_user=None,
generate_ssh_key=True))
repo = get_repo(args.repo)
repo.create_key(role.name, secret["ssh_public_key"])

parser = register_parser(grant, parent=deploy_parser)
Expand Down

0 comments on commit 1253454

Please sign in to comment.