   def init(%Config{build: %BuildConfig{identity: identity, workspace: workspace, host: host, user: user} = config}) do
     IO.inspect(config)
     with {:ok, config} <- check_config(config),
-         :ok <- ensure_local_git_remotes(config),
          :ok <- SSH.start(),
          {:ok, identity_file} <- File.open(identity) do
            host 

    workspace = config.workspace
    revision = config.revision
    target_mix_env = config.mix_env || "prod"
    case git_push(user_host, user_identity) do
      {:ok, _} -> :ok
      {:error, msg} -> raise "Error: #{msg}"
    end

    {:ok, config}        
  end

  defp git_push(host, workspace, identity) do
    git_push = Application.get_env(:bootleg, :push_options, "-f")
    refspec = Application.get_env(:bootleg, :refspec, "master")
    git_env = if identity, do: [{"GIT_SSH_COMMAND", "ssh -i '#{identity}'"}]
    host_url = "#{host}:#{workspace}"

    IO.puts "Pushing new commits with git to: #{host}"
    
    case Git.push(["--tags", git_push, host_url, refspec], env: (git_env || [])) do
      {"", 0} -> {:ok, nil}
      {res, 0} -> IO.puts res
                  {:ok, res}
